LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 7910 - clang crash with hexadecimal float without any significand digits
Summary: clang crash with hexadecimal float without any significand digits
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: Frontend (show other bugs)
Version: unspecified
Hardware: PC Linux
: P normal
Assignee: Unassigned Clang Bugs
URL:
Keywords: crash-on-invalid
: 7941 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-14 23:04 PDT by Eli Friedman
Modified: 2012-02-07 07:48 PST (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments
fixes the bug, includes a test (1.74 KB, patch)
2012-01-27 08:37 PST, Eitan Adler
Details
fixes the issue; better warning text & no tabs (1.81 KB, patch)
2012-02-06 21:08 PST, Eitan Adler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eli Friedman 2010-08-14 23:04:11 PDT
Testcase:
double e = 0x.p0;

Crashes with:
clang: APFloat.cpp:2248: llvm::APFloat::opStatus llvm::APFloat::convertFromHexadecimalString(llvm::StringRef, llvm::APFloat::roundingMode): Assertion `(dot == end || p - begin != 1) && "Significand has no digits"' failed.
Comment 1 Eli Friedman 2010-08-19 19:50:33 PDT
*** Bug 7941 has been marked as a duplicate of this bug. ***
Comment 2 Eitan Adler 2012-01-27 08:37:59 PST
Created attachment 7961 [details]
fixes the bug, includes a test
Comment 3 Eitan Adler 2012-02-06 21:08:55 PST
Created attachment 8009 [details]
fixes the issue; better warning text & no tabs
Comment 4 Eitan Adler 2012-02-07 07:48:47 PST
committed in r149984