Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASAN Builds Error on Hello world #112

Closed
JohnathanNorman opened this issue Sep 19, 2019 · 5 comments
Closed

ASAN Builds Error on Hello world #112

JohnathanNorman opened this issue Sep 19, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@JohnathanNorman
Copy link

JohnathanNorman commented Sep 19, 2019

builds made with "--enable-asan" will crash on any input

spoofy@puter:~/src/hermes/build_asan/bin$ echo "'use strict'; function hello() { print('Hello World'); } hello();" | ./hermes 
Hello World

=================================================================
==6796==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x7fa045538000 in thread T0
    #0 0x7fa04444e7b8 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde7b8)
    #1 0x55e6e7cd4321 in hermes::oscompat::SigAltStackDeleter::~SigAltStackDeleter() ../lib/Support/OSCompatPosix.cpp:522
    #2 0x55e6e7607800 in main ../tools/hermes/hermes.cpp:181
    #3 0x7fa0429c0b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #4 0x55e6e7606129 in _start (/home/spoofy/src/hermes/build_asan/bin/hermes+0x322129)

Address 0x7fa045538000 is a wild pointer.
SUMMARY: AddressSanitizer: bad-free (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde7b8) in __interceptor_free

tested on commit 41a8072 .

@tmikov
Copy link
Contributor

tmikov commented Sep 19, 2019

Ironically this is caused by a workaround for a leak that ASAN was reporting. Can you please share details about your system configuration: which Linux version and more importantly which compiler version?

@tmikov tmikov added the bug Something isn't working label Sep 19, 2019
@JohnathanNorman
Copy link
Author

clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix

Ubuntu 18.04.3 LTS

@tmikov
Copy link
Contributor

tmikov commented Sep 20, 2019

Thank you! We are working on fixing this (for some reason it wasn't showing in our continuous ASAN tests).

@davedets
Copy link

Jonathan -- Hi! We believe we fixed this in Hermes quite a while ago; my apologies for not noting that here. Would you be able to verify whether this problem has gone away for you?

@davedets
Copy link

I'm going to close, assuming that our fix did in fact work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants