[valgrind] [Bug 382515] valgrind: "Assertion 'di->have_dinfo' failed." on wine's dlls/mscoree/tests/mscoree.c
https://bugs.kde.org/show_bug.cgi?id=382515 Austin Englishchanged: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #14 from Austin English --- (In reply to Philippe Waroquiers from comment #13) > Thanks for the testing > Patch committed as revision 16465. > > As discussed in comment 12, really handling this kind of debug info > will be another bug (if needed) Fixed in r16465, thanks Philippe. Next bug is bug 382978. -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 382515] valgrind: "Assertion 'di->have_dinfo' failed." on wine's dlls/mscoree/tests/mscoree.c
https://bugs.kde.org/show_bug.cgi?id=382515 --- Comment #13 from Philippe Waroquiers--- Thanks for the testing Patch committed as revision 16465. As discussed in comment 12, really handling this kind of debug info will be another bug (if needed) -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 382515] valgrind: "Assertion 'di->have_dinfo' failed." on wine's dlls/mscoree/tests/mscoree.c
https://bugs.kde.org/show_bug.cgi?id=382515 --- Comment #12 from Austin English--- (In reply to Philippe Waroquiers from comment #11) > Note that the patch is compiling on linux, but is completely untested. > So, expect fire, smoke and explosions ... Thanks Philippe, the patch makes things look much nicer! Here's the output (with wine specific output you don't care about removed): ../../../tools/runtest -q -P wine -T ../../.. -M mscoree.dll -p mscoree_test.exe.so mscoree && touch mscoree.ok ==15080== Warning: Missing or un-stat-able /home/austin/.wine/drive_c/windows/system32/shlwapi.pdb ==15194== Warning: Missing or un-stat-able /home/austin/.wine/drive_c/windows/system32/shlwapi.pdb ==15194== Warning: Missing or un-stat-able /home/austin/.wine/drive_c/windows/mono/mono-2.0/bin/libmono-2.0-x86.pdb ==15194== LOAD_PDB_DEBUGINFO: \032 header character not found. possible invalid/unsupported pdb file format? ==15194== LOAD_PDB_DEBUGINFO: find_pdb_header found no hdr. possible invalid/unsupported pdb file format? ==15194== LOAD_PDB_DEBUGINFO: failed loading info from /home/austin/.wine/drive_c/windows/mono/mono-2.0/lib/mono/4.5/mscorlib.pdb ==15080== Warning: Missing or un-stat-able /home/austin/.wine/drive_c/windows/mono/mono-2.0/bin/libmono-2.0-x86.pdb ==15080== LOAD_PDB_DEBUGINFO: \032 header character not found. possible invalid/unsupported pdb file format? ==15080== LOAD_PDB_DEBUGINFO: find_pdb_header found no hdr. possible invalid/unsupported pdb file format? ==15080== LOAD_PDB_DEBUGINFO: failed loading info from /home/austin/.wine/drive_c/windows/mono/mono-2.0/lib/mono/4.5/mscorlib.pdb ==15080== LOAD_PDB_DEBUGINFO: \032 header character not found. possible invalid/unsupported pdb file format? ==15080== LOAD_PDB_DEBUGINFO: find_pdb_header found no hdr. possible invalid/unsupported pdb file format? ==15080== LOAD_PDB_DEBUGINFO: failed loading info from /home/austin/.wine/drive_c/windows/mono/mono-2.0/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.pdb the first (missing shlwapi), is valid, wine doesn't build .pdb files for its own dlls. libmono-2.0-x86.pdb is also not included in wine-mono, not sure why it didn't get one when others did, but that's how it is the other two are C# dlls, so the unexpected pdb format makes sense FYI, I've written a patch for this format for `file`, it's header is: BSBJ\001\000\001\000\000\000\000\000\f\000\000\000PDB\ v1.0 though note that the 'v' is case insensitive. As far as I'm concerned, this patch is good enough for now. I'll likely file a follow up bug once this is resolved so that it's known/documented, but I don't think the effort to implement is worth the gain, unless running c# code under valgrind gets popular.. -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 382515] valgrind: "Assertion 'di->have_dinfo' failed." on wine's dlls/mscoree/tests/mscoree.c
https://bugs.kde.org/show_bug.cgi?id=382515 --- Comment #11 from Philippe Waroquiers--- Note that the patch is compiling on linux, but is completely untested. So, expect fire, smoke and explosions ... -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 382515] valgrind: "Assertion 'di->have_dinfo' failed." on wine's dlls/mscoree/tests/mscoree.c
https://bugs.kde.org/show_bug.cgi?id=382515 --- Comment #10 from Philippe Waroquiers--- Created attachment 106973 --> https://bugs.kde.org/attachment.cgi?id=106973=edit better report/handle and survive to invalid/unexpected pdb format -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 382515] valgrind: "Assertion 'di->have_dinfo' failed." on wine's dlls/mscoree/tests/mscoree.c
https://bugs.kde.org/show_bug.cgi?id=382515 --- Comment #9 from Philippe Waroquiers--- Can you try the attached patch ? This produces more user messages when it cannot read a pdb file. Also, it should recover properly from an invalid/unsupported pdb file. Note also that a quick search on the web seems to indicate that Mingw does not generate pdb files, bur rather seems to generate dwarf debug info. Strange however that mscorlib.pdb indicates a PDB 1.0 version (which seems a very old format?). Maybe PDB 1.0 is just the container format ? Even in the wine sources (pdb.c), I could not find anything about this format, wine pdb.c seems to expect the same as valgrind readpdb.c expects. So, at this time, unclear how to read this pdb file, so let's try to make Valgrind resists to it ... -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 382515] valgrind: "Assertion 'di->have_dinfo' failed." on wine's dlls/mscoree/tests/mscoree.c
https://bugs.kde.org/show_bug.cgi?id=382515 --- Comment #8 from Austin English--- (In reply to Philippe Waroquiers from comment #6) > The valgrind code expects something very precise as a header. > See function static void* find_pdb_header( void* pdbimage, > unsigned* signature ) > followed by one of 2 struct (either an old pdb or a new pdb struct). > It looks like the code is not ready at all to read the above. > If only the header (slightly) differs, it might be easy to enhance the > valgrind pdb header. > But if the mscorelib.pdb is very different, then that will be a significant > work. > Note that the readpdb.c seems to be a forked copy of some wine code, as I > understand It seems I misspoke, the pdb comes from mono, via csc/roslyn: http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc https://github.com/dotnet/roslyn also, note that Microsoft released info about the PDB format a while back for LLVM/Clang, under the MIT license: https://github.com/dotnet/roslyn While getting these pdbs would be cool long term, my immediate concern is valgrind crashing. Printing an error/fixme would be enough for me, for this bug report. -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 382515] valgrind: "Assertion 'di->have_dinfo' failed." on wine's dlls/mscoree/tests/mscoree.c
https://bugs.kde.org/show_bug.cgi?id=382515 --- Comment #7 from Austin English--- Created attachment 106926 --> https://bugs.kde.org/attachment.cgi?id=106926=edit debug log 2 with --trace-symtab=yes --trace-symtab-patt=*mscorlib* -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 382515] valgrind: "Assertion 'di->have_dinfo' failed." on wine's dlls/mscoree/tests/mscoree.c
https://bugs.kde.org/show_bug.cgi?id=382515 --- Comment #6 from Philippe Waroquiers--- mscorelib.pdb starts with: 0005342424a00010001000c B S J B 001 \0 001 \0 \0 \0 \0 \0 \f \0 \0 \0 020445020423156302e0005 P D B V 1 . 0 \0 \0 \0 \0 \0 \0 005 \0 04000702154000a7e2321c4000a p \0 \0 \0 T ! \n \0 # ~ \0 \0 304 ! \n \0 0608c14532372746e697367 024 214 \0 \0 # S t r i n g s \0 \0 \0 \0 100add8000a0040472349550044 330 255 \n \0 @ \0 \0 \0 # G U I D \0 \0 \0 while another wine pdb starts with: od -xc wine_gecko-2.36-x86-dbg/gfx/angle/src/libEGL/libEGL.pdb | head -10 000694d7263736f666f20742f432b43202b M i c r o s o f t C / C + + 020534d20462e3730300a0d441a0053 M S F 7 . 0 0 \r \n 032 D S \0 \0 \0 04010000002025509f4 \0 020 \0 \0 002 \0 \0 \0 U 002 \0 \0 364 \t \0 \0 0600253 \0 \0 \0 \0 S 002 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 100 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 The valgrind code expects something very precise as a header. See function static void* find_pdb_header( void* pdbimage, unsigned* signature ) followed by one of 2 struct (either an old pdb or a new pdb struct). It looks like the code is not ready at all to read the above. If only the header (slightly) differs, it might be easy to enhance the valgrind pdb header. But if the mscorelib.pdb is very different, then that will be a significant work. Note that the readpdb.c seems to be a forked copy of some wine code, as I understand -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 382515] valgrind: "Assertion 'di->have_dinfo' failed." on wine's dlls/mscoree/tests/mscoree.c
https://bugs.kde.org/show_bug.cgi?id=382515 --- Comment #5 from Austin English--- Forgot to say, first line of mingw64's pdb is: BSJB PDB V1.0 first character is \042 -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 382515] valgrind: "Assertion 'di->have_dinfo' failed." on wine's dlls/mscoree/tests/mscoree.c
https://bugs.kde.org/show_bug.cgi?id=382515 --- Comment #4 from Austin English--- (In reply to Philippe Waroquiers from comment #3) > This find_pdb_header is searching for a specific character '\032' > and the string "Microsoft C/C++" > Is the pdb file containing the expected pdb header ? No, it does not. These files were produced by mingw64. File considers them data: /home/austin/.wine/drive_c/windows/mono/mono-2.0/lib/mono/4.5/mscorlib.pdb: data whereas real .pdb files from visual studio appear as: ./memory/mozalloc/mozalloc.pdb: MSVC program database ver 7.00, 4096*95 bytes it's produced by Mingw, not Microsoft. Whereas my real pdb's first line is: Microsoft C/C++ MSF 7.00 DS The first hex character is 0x4D, however (maybe I'm misunderstanding what you're asking). FYI, I uploaded the file here: http://austinenglish.com/files/for_valgrind/mscorlib.pdb the genuine pdb files I used are at https://phoenixnap.dl.sourceforge.net/project/wine/Wine%20Gecko/2.36/wine_gecko-2.36-x86-dbg-msvc-pdb.tar.bz2 > I guess wine and/or microsoft-windows have objdump like utilities ? > Or else just look with emacs this pdb and another working pdb, to > see if the expected data is there ? > > Would be good also to redo the tracing above adding something like > --trace-symtab=yes --trace-symtab-patt=*mscorlib* I'll get this in a bit or tomorrow. -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 382515] valgrind: "Assertion 'di->have_dinfo' failed." on wine's dlls/mscoree/tests/mscoree.c
https://bugs.kde.org/show_bug.cgi?id=382515 --- Comment #3 from Philippe Waroquiers--- The dll and pdb being loaded are: mscorlib.dll mscorlib.pdb Looking at the trace compared to the code, once we have seen the traces ==22926== LOAD_PDB_DEBUGINFO: Scanning PE section .reloc at avma 0x7ac000 svma 0x3ac000 --22926-- LOAD_PDB_DEBUGINFO: rx_map: avma 0x402000 size 3831716 foff 512 --22926-- LOAD_PDB_DEBUGINFO: rw_map: avma 0x7aa000 size1024 foff 3832320 --22926-- LOAD_PDB_DEBUGINFO: text: avma 0x402000 svma 0x2000 size 3831716 bias 0x0 there is only one place where the readpdb code returns without dinfo, that is: hdr = find_pdb_header( pdbimage, ); if (0==hdr) return False; /* JRS: significance? no pdb header? */ This find_pdb_header is searching for a specific character '\032' and the string "Microsoft C/C++" Is the pdb file containing the expected pdb header ? I guess wine and/or microsoft-windows have objdump like utilities ? Or else just look with emacs this pdb and another working pdb, to see if the expected data is there ? Would be good also to redo the tracing above adding something like --trace-symtab=yes --trace-symtab-patt=*mscorlib* -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 382515] valgrind: "Assertion 'di->have_dinfo' failed." on wine's dlls/mscoree/tests/mscoree.c
https://bugs.kde.org/show_bug.cgi?id=382515 --- Comment #2 from Austin English--- Created attachment 106785 --> https://bugs.kde.org/attachment.cgi?id=106785=edit debug log -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 382515] valgrind: "Assertion 'di->have_dinfo' failed." on wine's dlls/mscoree/tests/mscoree.c
https://bugs.kde.org/show_bug.cgi?id=382515 Philippe Waroquierschanged: What|Removed |Added CC||philippe.waroquiers@skynet. ||be --- Comment #1 from Philippe Waroquiers --- I improved the indentation of the code handling missing or un-stat-able pdb info (as the indentation is misleading). Rev 16460 But whatever, in this 'missing case', the code should execute a 'goto out" and not assert due to a failure to read a pdb. Can you run with more traces and attach the result ? (e.g; with -v -v -v -d -d -d, so that we can see which pdb file causes the assertion failure) -- You are receiving this mail because: You are watching all bug changes.