Bug 5955 – core.demangle fail to parse NaN and Infinity.
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
Other
OS
Mac OS X
Creation time
2011-05-08T02:51:00Z
Last change time
2011-06-19T11:38:56Z
Keywords
patch
Assigned to
nobody
Creator
kennytm
Comments
Comment #0 by kennytm — 2011-05-08T02:51:15Z
For example, the program
-------------------------------------------
module y;
template TTTTTTTTTT(float v) {
void TTTTTTTTTT() {
}
}
void main() {
TTTTTTTTTT!1.0f();
TTTTTTTTTT!(float.nan)();
TTTTTTTTTT!(float.infinity)();
}
-------------------------------------------
generates the symbols
_D1y22__T10TTTTTTTTTTVfeINFZ10TTTTTTTTTTFZv
_D1y22__T10TTTTTTTTTTVfeNANZ10TTTTTTTTTTFZv
_D1y23__T10TTTTTTTTTTVfe8PN3Z10TTTTTTTTTTFZv
which the demangler can only recognize 1 out of 3:
void y.__T10TTTTTTTTTTVfeINFZ.TTTTTTTTTT() // fail
void y.__T10TTTTTTTTTTVfeNANZ.TTTTTTTTTT() // fail
void y.TTTTTTTTTT!(1).TTTTTTTTTT() // ok