Bug 12115 – Segfault in FormatSpec.fillUp

Status
RESOLVED
Resolution
MOVED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2014-02-08T16:56:10Z
Last change time
2023-06-22T10:46:17Z
Assigned to
No Owner
Creator
briancschott

Comments

Comment #0 by briancschott — 2014-02-08T16:56:10Z
Steps to reproduce: 1) Check out DScanner from https://github.com/Hackerpilot/Dscanner/tree/a5d7bf095607f4b8d9c36a453e96e28aafdc96fe 2) Check out UnicodeData.d from https://github.com/SiegeLord/Tango-D2/blob/b4635847a67faff9480aeb2ff2bbbd23385f38df/tango/text/UnicodeData.d 3) Run the build.sh script in the DScanner folder to compile 4) run "./dscanner --syntaxCheck path/to/UnicodeData.d" Stack trace: #0 0x000000000059eba7 in std.format.__T10FormatSpecTaZ.FormatSpec.fillUp() () #1 0x0000000000543284 in std.format.__T10FormatSpecTaZ.FormatSpec.__T17writeUpToNextSpecTS3std5stdio4File17LockingTextWriterZ.writeUpToNextSpec() (this=<error reading variable>, writer=...) at /home/alaran/src/phobos/std/format.d:796 #2 0x000000000054da23 in std.format.__T14formattedWriteTS3std5stdio4File17LockingTextWriterTaTAyaTmTmTAyaTAyaZ.formattedWrite() (_param_6=..., _param_5=..., _param_4=2, _param_3=14778, _param_2=..., fmt=..., w=...) at /home/alaran/src/phobos/std/format.d:415 #3 0x000000000054d89a in std.stdio.File.__T8writeflnTaTAyaTmTmTAyaTAyaZ.writefln() (this=0x2, _param_5=..., _param_4=..., _param_3=2, _param_2=14778, _param_1=..., fmt=...) at /home/alaran/src/phobos/std/stdio.d:1101 #4 0x000000000054d80a in std.stdio.__T8writeflnTAyaTAyaTmTmTAyaTAyaZ.writefln() (_param_5=..., _param_4=..., _param_3=5525528, _param_2=5525528, _param_1=..., _param_0=...) at /home/alaran/src/phobos/std/stdio.d:2527 #5 0x00000000005844c3 in analysis.run.messageFunction() (isError=true, message=..., column=0, line=140737488345552, fileName=...) at analysis/run.d:27 #6 0x0000000000581912 in stdx.d.parser.Parser.error() ( this=0x5a9608 <std.stdio.File.LockingTextWriter.__postblit()+24>, shouldAdvance=17, message=0x000000000057884000007ffff7ecaf80) at stdx/d/parser.d:6320 #7 0x000000000057875b in stdx.d.parser.Parser.parseDeclaration() (this=0x2adc6) at stdx/d/parser.d:6307 #8 0x0000000000578030 in stdx.d.parser.Parser.parseDeclaration() (this=0x4) at stdx/d/parser.d:1608 This seems to only be present when DScanner is built with DMD. Building with GDC results in code that completes without segfaulting.