[ 
https://issues.apache.org/jira/browse/TS-4114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15092223#comment-15092223
 ] 

Jason Kenny commented on TS-4114:
---------------------------------

I was able to get this to build with an older version of of ASAN that comes 
with Developer tools v3 from Red Hat. When using a newer version with gcc 5 new 
features to report non-freed memory reports issues. The tool in question is 
just allocating memory and not freeing it. But given what it does in the build 
I can only assume no one thought it would be an issue as it only runs for a 
second or so.

The only two way to fix it are :

1) clean up your memory allocs
2) hack the lua custom make file to use different settings when making tools to 
build lua

I was more in favor in 1) as it does not require new special logic in the build 
files. It also follows what my mom told me, ie put back stuff when your are 
done with it. I tend to find that was good advice :-) 

> ASAN based build fails with gcc 5
> ---------------------------------
>
>                 Key: TS-4114
>                 URL: https://issues.apache.org/jira/browse/TS-4114
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>            Reporter: Jason Kenny
>            Assignee: Kit Chan
>             Fix For: 6.2.0
>
>
> When building with gcc 5.x and asan on, the build will fail with memory leak 
> issues in lua.
> ==1442==ERROR: LeakSanitizer: detected memory leaks
> Direct leak of 4112 byte(s) in 1 object(s) allocated from:
>     #0 0x47f8ea in __interceptor_malloc 
> (/home/jkenny/yats_build/asan_build/lib/luajit/src/host/buildvm+0x47f8ea)
>     #1 0x407c8d in build_code host/buildvm.c:204
>     #2 0x407c8d in main host/buildvm.c:446
>     #3 0x3a5201ed5c in __libc_start_main (/lib64/libc.so.6+0x3a5201ed5c)
> Direct leak of 1304 byte(s) in 1 object(s) allocated from:
>     #0 0x47fa51 in calloc 
> (/home/jkenny/yats_build/asan_build/lib/luajit/src/host/buildvm+0x47fa51)
>     #1 0x405666 in build_code host/buildvm.c:177
>     #2 0x405666 in main host/buildvm.c:446
>     #3 0x3a5201ed5c in __libc_start_main (/lib64/libc.so.6+0x3a5201ed5c)
> Direct leak of 372 byte(s) in 1 object(s) allocated from:
>     #0 0x47f8ea in __interceptor_malloc 
> (/home/jkenny/yats_build/asan_build/lib/luajit/src/host/buildvm+0x47f8ea)
>     #1 0x407cae in build_code host/buildvm.c:206
>     #2 0x407cae in main host/buildvm.c:446
>     #3 0x3a5201ed5c in __libc_start_main (/lib64/libc.so.6+0x3a5201ed5c)
> Direct leak of 296 byte(s) in 1 object(s) allocated from:
>     #0 0x47f8ea in __interceptor_malloc 
> (/home/jkenny/yats_build/asan_build/lib/luajit/src/host/buildvm+0x47f8ea)
>     #1 0x40568d in build_code host/buildvm.c:182
>     #2 0x40568d in main host/buildvm.c:446
>     #3 0x3a5201ed5c in __libc_start_main (/lib64/libc.so.6+0x3a5201ed5c)
> Direct leak of 16 byte(s) in 1 object(s) allocated from:
>     #0 0x47f8ea in __interceptor_malloc 
> (/home/jkenny/yats_build/asan_build/lib/luajit/src/host/buildvm+0x47f8ea)
>     #1 0x407c58 in sym_decorate host/buildvm.c:122
>     #2 0x407c58 in build_code host/buildvm.c:203
>     #3 0x407c58 in main host/buildvm.c:446
>     #4 0x3a5201ed5c in __libc_start_main (/lib64/libc.so.6+0x3a5201ed5c)
> Indirect leak of 14758 byte(s) in 1 object(s) allocated from:
>     #0 0x47f8ea in __interceptor_malloc 
> (/home/jkenny/yats_build/asan_build/lib/luajit/src/host/buildvm+0x47f8ea)
>     #1 0x407bbc in build_code host/buildvm.c:199
>     #2 0x407bbc in main host/buildvm.c:446
>     #3 0x3a5201ed5c in __libc_start_main (/lib64/libc.so.6+0x3a5201ed5c)
> Indirect leak of 2425 byte(s) in 156 object(s) allocated from:
>     #0 0x47f8ea in __interceptor_malloc 
> (/home/jkenny/yats_build/asan_build/lib/luajit/src/host/buildvm+0x47f8ea)
>     #1 0x4b129c in sym_decorate host/buildvm.c:122
>     #2 0x4b129c in sym_insert host/buildvm.c:166
>     #3 0x407ed5 in build_code host/buildvm.c:230
>     #4 0x407ed5 in main host/buildvm.c:446
>     #5 0x3a5201ed5c in __libc_start_main (/lib64/libc.so.6+0x3a5201ed5c)
> Indirect leak of 1082 byte(s) in 93 object(s) allocated from:
>     #0 0x47f8ea in __interceptor_malloc 
> (/home/jkenny/yats_build/asan_build/lib/luajit/src/host/buildvm+0x47f8ea)
>     #1 0x4b129c in sym_decorate host/buildvm.c:122
>     #2 0x4b129c in sym_insert host/buildvm.c:166
>     #3 0x407e72 in build_code host/buildvm.c:217
>     #4 0x407e72 in main host/buildvm.c:446
>     #5 0x3a5201ed5c in __libc_start_main (/lib64/libc.so.6+0x3a5201ed5c)
> Indirect leak of 525 byte(s) in 37 object(s) allocated from:
>     #0 0x47f8ea in __interceptor_malloc 
> (/home/jkenny/yats_build/asan_build/lib/luajit/src/host/buildvm+0x47f8ea)
>     #1 0x4b4722 in sym_decorate host/buildvm.c:122
>     #2 0x4b4722 in collect_reloc host/buildvm.c:140
>     #3 0x4b4722 in dasm_encode ../dynasm/dasm_x86.h:425
>     #4 0x407bce in build_code host/buildvm.c:200
>     #5 0x407bce in main host/buildvm.c:446
>     #6 0x3a5201ed5c in __libc_start_main (/lib64/libc.so.6+0x3a5201ed5c)
> Indirect leak of 1 byte(s) in 1 object(s) allocated from:
>     #0 0x47f8ea in __interceptor_malloc 
> (/home/jkenny/yats_build/asan_build/lib/luajit/src/host/buildvm+0x47f8ea)
>     #1 0x4b129c in sym_decorate host/buildvm.c:122
>     #2 0x4b129c in sym_insert host/buildvm.c:166
>     #3 0x407fc9 in build_code host/buildvm.c:235
>     #4 0x407fc9 in main host/buildvm.c:446
>     #5 0x3a5201ed5c in __libc_start_main (/lib64/libc.so.6+0x3a5201ed5c)
> SUMMARY: AddressSanitizer: 24891 byte(s) leaked in 293 allocation(s).
> make[5]: *** [lj_ffdef.h] Error 23



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to