Giter VIP home page Giter VIP logo

Comments (9)

MolecularMatters avatar MolecularMatters commented on August 10, 2024

Can you please provide more information when submitting an issue?
The description says "Microsoft.VisualStudio.Coverage.Monitor.pdb bug", but I don't see what's wrong.

It would be nice if you could describe what you're expecting to see, what's happening, what the actual bug is, etc.

from raw_pdb.

icyfox168168 avatar icyfox168168 commented on August 10, 2024

Problem with pointer, unable to run from start to finish

from raw_pdb.

icyfox168168 avatar icyfox168168 commented on August 10, 2024

You can download the PDB file and run it once to find out where the error is

from raw_pdb.

icyfox168168 avatar icyfox168168 commented on August 10, 2024

Can you reproduce it? The program cannot parse this PDB and will crash,

from raw_pdb.

lukekasz avatar lukekasz commented on August 10, 2024

I did a quick debugging session on this PDB (Microsoft.VisualStudio.Coverage.Monitor.zip) and there are some odd things about it.

It crashes because there is a S_LOCAL which has a type index 0x80100011, yet there are only 0x8795 types in the PDB. Also, this 0x80100011 looks like a bit mask and not a type index to me. Not sure why S_LOCAL would have this value for its type index and I wasn't able to find any hints in the microsoft-pdb repo.

If I handle this out of bounds type index gracefully and return type_index_out_of_range for the type name, then I get the following output for function variables in the function that crashes

S_LPROC32 Function 'DuplicateLoggerBuffer' | RVA 0x1C70
    S_LOCAL: 'CProfileMonitorControl' -> 'ProfileMonitorControl' | Param: True | Optimized Out: False
    S_DEFRANGE_REGISTER: Register 330
    S_DEFRANGE_REGISTER: Register 332
    S_LOCAL: 'CLoggerBuffer' -> 'SourceBuffer' | Param: True | Optimized Out: False
    S_DEFRANGE_REGISTER: Register 331
    S_DEFRANGE_REGISTER: Register 334
    S_LOCAL: '_GUID' -> 'ExecGuid' | Param: True | Optimized Out: False
    S_DEFRANGE_REGISTER: Register 336
    S_DEFRANGE_REGISTER: Register 342
    S_LOCAL: '_BUFFERHEADER' -> 'DuplicateBufferHeader' | Param: False | Optimized Out: False
    S_DEFRANGE_REGISTER: Register 337
    S_LOCAL: 'CLoggerBuffer' -> 'DuplicateBuffer' | Param: False | Optimized Out: False
    S_DEFRANGE_REGISTER: Register 333
    S_LOCAL: 'PUCHAR' -> 'SourceCoverageData' | Param: False | Optimized Out: False
    S_DEFRANGE_REGISTER: Register 331
    S_LOCAL: 'PUCHAR' -> 'DuplicateCoverageData' | Param: False | Optimized Out: False
    S_DEFRANGE_REGISTER: Register 330
    S_LOCAL: '_BUFFERHEADER' -> 'SourceBufferHeader' | Param: False | Optimized Out: False
    S_DEFRANGE_REGISTER: Register 331
    S_INLINESITE: Parent 0x5A7C
        S_INLINESITE: Parent 0x5C60
            S_LOCAL: 'ULONG' -> 'dwHandle' | Param: False | Optimized Out: False
            S_DEFRANGE_REGISTER: Register 20
            S_LOCAL: 'type_index_out_of_range' -> 'pbuf' | Param: False | Optimized Out: False
            S_DEFRANGE_REGISTER: Register 333
            S_DEFRANGE_REGISTER: Register 333
            S_INLINESITE: Parent 0x5C78
                S_CALLEES: Count 1
                S_LOCAL: 'type_index_out_of_range' -> 'pbuf' | Param: False | Optimized Out: False
                S_DEFRANGE_REGISTER: Register 328
                S_DEFRANGE_REGISTER: Register 328
                S_INLINESITE: Parent 0x5CF8
                S_INLINESITE_END:
            S_INLINESITE_END:
            S_INLINESITE: Parent 0x5C78
            S_INLINESITE_END:
        S_INLINESITE_END:
    S_INLINESITE_END:
    S_INLINESITE: Parent 0x5A7C
    S_INLINESITE_END:
    S_INLINESITE: Parent 0x5A7C
    S_INLINESITE_END:
    S_FRAMEPROC: Size 32 | Padding 0 | Padding Offset 0x0 | Callee Registers Size 24
    S_INLINEES: Count 14
    S_LABEL32: '$LN34' | Offset 0xD91
    S_REGREL32: 'ProfileMonitorControl' -> 'CProfileMonitorControl' | Register 335 | Register Offset 0x40
    S_REGREL32: 'SourceBuffer' -> 'CLoggerBuffer' | Register 335 | Register Offset 0x48
    S_REGREL32: 'ExecGuid' -> '_GUID' | Register 335 | Register Offset 0x50
    S_CALLSITEINFO: 'type_index_out_of_range' | Offset 0xC98 | Section 1
    S_CALLSITEINFO: 'type_index_out_of_range' | Offset 0xCBC | Section 1
S_END

As you can see, there are multiple type_index_out_of_range in the output for the function.

Even after this change, it hits asserts due to Unhandled record kind 0x117F with block level 1. I'm unable to find any information on record kind 0x117F.

I then tried running this pdb through llvm-debuginfo-analyzer and it just crashes on the PDB.

I also tried running it throught dia2dump, but it appears it does not print the function variables/scopes.

You can search for the crashing function DuplicateLoggerBuffer in the dia2dump output and see it provides no details about the variables in functions.

A deeper investigation of the PDB be is required to figure out exactly what is going on. Maybe writing a parser with the DIA SDK could be a way forward to help understand what is going on :-)

from raw_pdb.

icyfox168168 avatar icyfox168168 commented on August 10, 2024

This is the standard library included in vs2022, while jpeg62.pdb is a library that I compiled using vcpkg. I'm not sure if it's the wrong type. I downloaded some PDB files for system DLLs using x64dbg and also detected a crash. Once this is fixed, I will scan those PDB files again

from raw_pdb.

icyfox168168 avatar icyfox168168 commented on August 10, 2024

How many days are there updates?, I would like to scan all the PDBs in the Windows DLL once, and wait for you to update this error

from raw_pdb.

tivolo avatar tivolo commented on August 10, 2024

This repo is maintained by contributors in their spare time, so please don't expect people to jump at issues as soon as they are reported.

Furthermore, what are you trying to do, i.e. what information are you after?
Do you need all the function/local variable/register information?
E.g. as stated above, Dia2Dump does not give this information, so running all the other examples for all the PDBs probably runs fine.

from raw_pdb.

lukekasz avatar lukekasz commented on August 10, 2024

I am unlikely to investigate this issue further. It looks to me like the PDB either has bad data or is using unknown magic values and it will probably require significant effort and/or some trial&error to fully understand the data in this PDB, especially since there is no source available.

As tivolo mentions, the PDB works fine for cases where do you not need function variables and also any use cases where you do not have the source, which I guess would be all use cases outside of Microsoft :-)

So unless there is another PDB with available source that has similar values for S_LOCAL and record kind 0x117F, then I currently don't see much value in fixing this issue.

from raw_pdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.