Bug 18498 – File buffer overrun when using lexer-as-library

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-02-22T19:30:00Z
Last change time
2024-12-13T18:57:16Z
Assigned to
No Owner
Creator
Walter Bright
Moved to GitHub: dmd#19395 →

Comments

Comment #0 by bugzilla — 2018-02-22T19:30:00Z
As reported on the internet: --- Reminds me of a bug I ran into recently while using the dmd lexer in a project. When I passed any valid file to the lexer it worked fine. When I passed a batch of valid files to the lexer, after a few files were processed, it started to spit out all kinds of errors about invalid Unicode code-points and ghost tokens. All those locations were past EOF. When I passed in that particular file individually it worked like a charm. When I over-sized the buffer that held a file by one char and set that to 0 it worked for the batch of files.
Comment #1 by robert.schadek — 2024-12-13T18:57:16Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19395 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB