Bug 20817 – valigrind shows that parseJSON() generates errors relating to uninitialised values

Status
NEW
Severity
major
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-05-10T01:15:19Z
Last change time
2024-12-01T16:36:45Z
Assigned to
No Owner
Creator
Alex Braunegg
Moved to GitHub: phobos#10417 →

Attachments

IDFilenameSummaryContent-TypeSize
1784main.dreproducertext/x-csrc163173
1785valgrind-out-202005101049.txtvalgrind outputtext/plain65103
1786make_with_dmd.shcompile & run valgrindtext/x-sh407

Comments

Comment #0 by alex.braunegg — 2020-05-10T01:15:19Z
Created attachment 1784 reproducer Background: =========== * Trying to determine if a memory leak exists in trying to diagnose https://github.com/abraunegg/onedrive/issues/893 * Valgrind is showing some interesting data re uninitialised values and possibly lost blocks Valgrind errors: ================ * Use of uninitialised value of size X * Conditional jump or move depends on uninitialised value(s) * Uninitialised value was created by a stack allocation Files Attached: =============== * main.d (reproducer) * valgrind-out-202005101049.txt (valgrind output) * make_with_dmd.sh (compile & test with valgrind) Questions: ========== Is this a valid bug? I have looked through json.d and to me, everything looks like it gets initialised correctly.
Comment #1 by alex.braunegg — 2020-05-10T01:15:55Z
Created attachment 1785 valgrind output
Comment #2 by alex.braunegg — 2020-05-10T01:16:25Z
Created attachment 1786 compile & run valgrind
Comment #3 by b2.temp — 2020-05-24T07:01:01Z
The report is valid. I also see the same report (+ a 112 bytes leak) on x86_64. But this is either a druntime bug (GC) or phobos (std.json)
Comment #4 by robert.schadek — 2024-12-01T16:36:45Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10417 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB