[cfe-dev] Assertion violations
Dale Johannesen
dalej at apple.com
Thu Aug 19 11:04:35 PDT 2010
On Aug 18, 2010, at 10:01 PMPDT, Roberto Bagnara wrote:
>
> Testing clang against GCC's test suite results into several
> violated assertions. Are you interested in receiving bug
> reports for those?
Yes, thanks.
> *******************************************************************
> float-range-1.c
> *******************************************************************
> [Thread 1] APFloat.cpp:161: int readExponent(const char*, const
> char*): Assertion failed: p == end && "Invalid exponent in exponent"
> Stack dump:
> 0. float-range-1.c:12:13: current parser token '1e+100000000f'
> 1. float-range-1.c:11:1: parsing function body 'f'
> 2. float-range-1.c:11:1: in compound statement ('{}')
> Aborted (core dumped)
I fixed this one, 111534. Incidentally, gcc-4.2 warns on this only
with -pedantic, while clang warns by default. Is that intentional?
> *****************************************************************
> c99-hexfloat-3.c
> *******************************************************************
> [Thread 1] APFloat.cpp:2248: llvm::APFloat::opStatus
> llvm::APFloat::convertFromHexadecimalString(llvm::StringRef,
> llvm::APFloat::roundingMode): Assertion failed: (dot == end || p -
> begin != 1) && "Significand has no digits"
> Stack dump:
> 0. c99-hexfloat-3.c:16:13: current parser token '0x.p0'
> Aborted (core dumped)
clang is correct to reject this although of course it should not
crash. Generally APFloat expects correct input and asserts if it
doesn't find it, so the fix should probably be upstream.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100819/6a699347/attachment.html>
More information about the cfe-dev
mailing list