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

Floating Point Exception in remNode #937

Open
clesmian opened this issue Aug 21, 2023 · 0 comments
Open

Floating Point Exception in remNode #937

clesmian opened this issue Aug 21, 2023 · 0 comments

Comments

@clesmian
Copy link

While fuzzing commit a1fc328 compiled without ASAN I found the following file to crash the compiler with a floating point exception:

process=6000000000e0%-1;

A subsequent build of the same commit with ASAN lead to the following ASAN output:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==597244==ERROR: AddressSanitizer: FPE on unknown address 0x564c70e85e86 (pc 0x564c70e85e86 bp 0x7f7c3f8f7e80 sp 0x7f7c3f8f7be0 T1)
    #0 0x564c70e85e85 in remNode(Node const&, Node const&) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x96ae85)
    #1 0x564c70dd5cec in BinOp::compute(Node const&, Node const&) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x8bacec)
    #2 0x564c70dc6377 in simplification(CTree*) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x8ab377)
    #3 0x564c70dc5921 in traced_simplification(CTree*) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x8aa921)
    #4 0x564c70dc79a5 in sigMap(CTree*, CTree* (*)(CTree*), CTree*) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x8ac9a5)
    #5 0x564c70dc5b9a in simplify(CTree*) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x8aab9a)
    #6 0x564c70e61a77 in realPropagate(CTree*, CTree*, CTree*, std::vector<CTree*, std::allocator<CTree*> > const&) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x946a77)
    #7 0x564c70e68461 in propagate(CTree*, CTree*, CTree*, std::vector<CTree*, std::allocator<CTree*> > const&) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x94d461)
    #8 0x564c70e68910 in boxPropagateSig(CTree*, CTree*, std::vector<CTree*, std::allocator<CTree*> > const&) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x94d910)
    #9 0x564c7093137c in realeval(CTree*, CTree*, CTree*) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x41637c)
    #10 0x564c709304ba in eval(CTree*, CTree*, CTree*) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x4154ba)
    #11 0x564c7093430a in realeval(CTree*, CTree*, CTree*) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x41930a)
    #12 0x564c709304ba in eval(CTree*, CTree*, CTree*) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x4154ba)
    #13 0x564c7093c20f in evalIdDef(CTree*, CTree*, CTree*) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x42120f)
    #14 0x564c70933cce in realeval(CTree*, CTree*, CTree*) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x418cce)
    #15 0x564c709304ba in eval(CTree*, CTree*, CTree*) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x4154ba)
    #16 0x564c7092e902 in evalprocess(CTree*) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x413902)
    #17 0x564c70d618c6 in evaluateBlockDiagram(CTree*, int&, int&) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x8468c6)
    #18 0x564c70d6866c in createFactoryAux1(void*) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x84d66c)
    #19 0x7f7c431e9608 in start_thread /build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c:477
    #20 0x7f7c42dc0132 in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x11f132)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: FPE (/home/clesmian/targets/faust/bin-latest-asan/faust+0x96ae85) in remNode(Node const&, Node const&)
Thread T1 created by T0 here:
    #0 0x7f7c4323e815 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cc:208
    #1 0x564c70ce3d58 in callFun(void* (*)(void*), void*) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x7c8d58)
    #2 0x564c70d69dd7 in createFactory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, char const**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool) (/home/clesmian/targets/faust/bin-latest-asan/faust+0x84edd7)
    #3 0x564c70d79d49 in main (/home/clesmian/targets/faust/bin-latest-asan/faust+0x85ed49)
    #4 0x7f7c42cc5082 in __libc_start_main ../csu/libc-start.c:308

==597244==ABORTING

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant