herbgrind
herbgrind copied to clipboard
Long Doubles Aren't Supported Correctly
While fixing issue #49, I found that the long double
type is actually supported by glibc's libm, and gcc on 64-bit platforms actually emulates 80-bit floats for it (source: https://gcc.gnu.org/onlinedocs/gcc-4.5.3/gcc/i386-and-x86_002d64-Options.html). Investigation needs to be done into whether it's feasible to support long double's in Herbgrind.
Hi @HazardousPeach ,
Is there a way to go around this issue? I tried to run herbgrind on one of my unittest and saw below. I guess it is related to long double?
Herbgrind: helper/ir-info.c:878 (runEmulatedOp): the 'impossible' happened.
host stacktrace:
==530391== at 0x58028EA2: show_sched_status_wrk (m_libcassert.c:369)
==530391== by 0x58028FA7: report_and_quit (m_libcassert.c:440)
==530391== by 0x58029130: vgPlain_assert_fail (m_libcassert.c:506)
==530391== by 0x5800285F: runEmulatedOp (ir-info.c:878)
==530391== by 0x58016A77: execLocalOp (local-op.c:52)
==530391== by 0x58010B29: executeChannelShadowOp (shadowop.c:279)
==530391== by 0x5801130B: executeShadowOp (shadowop.c:100)
==530391== by 0x101C966BDD: ???
==530391== by 0x1006FB2F2F: ???
==530391== by 0x114F2: ???
==530391== by 0x100200CBCF: ???
sched status:
running_tid=1
Thread 1: status = VgTs_Runnable (lwpid 530391)
==530391== at 0x33F043BDA8: scalbnl (in /usr/lib64/libm-2.12.so)
==530391== by 0x33F043BEA5: ldexpl (in /usr/lib64/libm-2.12.so)
==530391== by 0x7BF1039: std::ldexp(long double, int) (cmath:343)
==530391== by 0x7E7F7DB: boost::multiprecision::backends::cpp_dec_float<100u, int, void>::operator=(long double) (cpp_dec_float.hpp:2248)
==530391== by 0x7E6D237: boost::multiprecision::backends::cpp_dec_float<100u, int, void>::cpp_dec_float<long double>(long double, boost::enable_if<boost::is_floating_point<long double>, void>::type*) (cpp_dec_float.hpp:255)
==530391== by 0x7E52580: boost::multiprecision::backends::cpp_dec_float<100u, int, void>::half() (cpp_dec_float.hpp:313)
==530391== by 0x7E2EDFE: boost::multiprecision::backends::cpp_dec_float<100u, int, void>::initializer::initializer() (cpp_dec_float.hpp:155)
checked with --print-semantic-ops, the last op is ScaleF64:
==794249==
AbsF64 on t134,
AbsF64
0x10024195C4 = AbsF64(0x1002419594)
ScaleF64 on t64, t51,
ScaleF64
Herbgrind: helper/ir-info.c:878 (runEmulatedOp): the 'impossible' happened.