<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);" dir="auto">
Thank you very<span> much, I will try that. </span></div>
<div id="ms-outlook-mobile-signature" dir="auto">
<div><br>
</div>
Get <a href="https://aka.ms/AAb9ysg">Outlook for Android</a></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> David Marchand <david.marchand@redhat.com><br>
<b>Sent:</b> Thursday, June 16, 2022 11:45:33 PM<br>
<b>To:</b> Juan Pablo L. <jpablolorenzetti@hotmail.com><br>
<b>Cc:</b> users@dpdk.org <users@dpdk.org>; Burakov, Anatoly <anatoly.burakov@intel.com>; Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>; dev <dev@dpdk.org>; ci@dpdk.org <ci@dpdk.org><br>
<b>Subject:</b> Re: dpdk address sanitizer</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hello,<br>
<br>
On Fri, Jun 17, 2022 at 6:08 AM Juan Pablo L.<br>
<jpablolorenzetti@hotmail.com> wrote:<br>
><br>
> Hello, I am new to dpdk ... i would like to trace memory usage and detect memory leaks, valgrind as well as address sanitizer (gcc) report some memory loss at application end. For the life of me, i cannot figure it out ... i just write a simple program that
 has the rte_eal_init + rte_eal_cleanup and i get the following error (also tried helloworld from examples, with same results):<br>
><br>
> ==3399==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f6ca3efb480 at pc 0x7f6ca7162b61 bp 0x7f6ca3efb450 sp 0x7f6ca3efac00<br>
> WRITE of size 24 at 0x7f6ca3efb480 thread T-1<br>
> #0 0x7f6ca7162b60 in __interceptor_sigaltstack.part.0 (/lib64/libasan.so.8+0x61b60)<br>
> #1 0x7f6ca71d9337 in __sanitizer::UnsetAlternateSignalStack() (/lib64/libasan.so.8+0xd8337)<br>
> #2 0x7f6ca71c90f4 in __asan::AsanThread::Destroy() (/lib64/libasan.so.8+0xc80f4)<br>
> #3 0x7f6ca679b000 in __GI___nptl_deallocate_tsd (/lib64/libc.so.6+0x8a000)<br>
> #4 0x7f6ca679dc9d in start_thread (/lib64/libc.so.6+0x8cc9d)<br>
> #5 0x7f6ca68235df in __GI___clone3 (/lib64/libc.so.6+0x1125df)<br>
><br>
> Address 0x7f6ca3efb480 is a wild pointer inside of access range of size 0x000000000018.<br>
> SUMMARY: AddressSanitizer: stack-buffer-overflow (/lib64/libasan.so.8+0x61b60) in __interceptor_sigaltstack.part.0<br>
> Shadow bytes around the buggy address:<br>
> 0x0fee147d7640: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00<br>
> 0x0fee147d7650: 00 00 00 00 00 00 00 00 00 06 f2 f2 f2 f2 00 00<br>
> 0x0fee147d7660: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
> 0x0fee147d7670: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
> 0x0fee147d7680: 00 00 00 00 00 00 00 00 00 00 00 04 f3 f3 f3 f3<br>
> =>0x0fee147d7690:[f3]f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00<br>
> 0x0fee147d76a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
> 0x0fee147d76b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
> 0x0fee147d76c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
> 0x0fee147d76d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
> 0x0fee147d76e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br>
> Shadow byte legend (one shadow byte represents 8 application bytes):<br>
> Addressable: 00<br>
> Partially addressable: 01 02 03 04 05 06 07<br>
> Heap left redzone: fa<br>
> Freed heap region: fd<br>
> Stack left redzone: f1<br>
> Stack mid redzone: f2<br>
> Stack right redzone: f3<br>
> Stack after return: f5<br>
> Stack use after scope: f8<br>
> Global redzone: f9<br>
> Global init order: f6<br>
> Poisoned by user: f7<br>
> Container overflow: fc<br>
> Array cookie: ac<br>
> Intra object redzone: bb<br>
> ASan internal: fe<br>
> Left alloca redzone: ca<br>
> Right alloca redzone: cb<br>
> ==3399==ABORTING<br>
><br>
> I am not sure what I m doing wrong but it is very frustrating. On top of that, I try other scenarios and see if I can just "ignore" that and still detect other memory leaks but it does not work. I get memory from rte_malloc and don't free it and I still get
 the above report only, I do not get any report from the memory I leaked intentionally ... no difference what so ever .... I tried the same with the helloworld example and I get the same results ....<br>
<br>
I experienced the same issue recently on Fedora 36.<br>
I did not investigate.<br>
<br>
I think I waived this warning, by setting<br>
ASAN_OPTIONS="use_sigaltstack=0" in the environment.<br>
HTH.<br>
<br>
-- <br>
David Marchand<br>
<br>
</div>
</span></font></div>
</body>
</html>