Git Product home page Git Product logo

Comments (4)

marxin avatar marxin commented on June 29, 2024

Build with:

g++ asan.ii -g -c && ./bin/diva asan.o
DW_DLE_ATTR_FORM_BAD (114)
ERR_INVALID_DWARF: Failed to read DWARF from 'asan.o'

from diva.

SeanEveson avatar SeanEveson commented on June 29, 2024

Reproduced: repro.zip

Looks like gcc is now outputting template parameter values in block form rather than as integers (which is valid DWARF).

 DW_TAG_template_value_parameter
   DW_AT_name                  "b" <form DW_FORM_string>
   DW_AT_type                  <0x00000072> <form DW_FORM_ref4>
   DW_AT_const_value           03000000 <form DW_FORM_block1>

This has the same underlying problem as issue #1 (quick fixed), where we could account for more forms when reading attributes, and handle forms we aren't expecting better.

from diva.

SeanEveson avatar SeanEveson commented on June 29, 2024

As an aside I wonder why the value is now encoded as DW_FORM_block* (a collection of bytes) rather than DW_FORM_data*.

The reader of the DWARF can't interpret the value without knowing what the bytes represent. In this case they're a little endian integer but there is no way of 'knowing' that.

from diva.

jakubjelinek avatar jakubjelinek commented on June 29, 2024

The type is the DW_AT_type on the DW_TAG_template_value_parameter. If you look at DWARF, e.g. DWARF5 pdf, block class next to constant and string are the supported classes.
While this inefficiency has been fixed in the mean time in GCC 8, if you say have template parameter with say __int128_t type that doesn't fit into 64-bits (signed or unsigned), you'll get a block too.

from diva.

Related Issues (10)

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.