Skip to content

Valgrind and Clang-14 dwarf support #18

Description

@FabrizioSandri

Description

Running RcppDeepState with Valgrind and Clang version 14 gives this strange error message:

Error in read_xml.raw(charToRaw(enc2utf8(x)), "UTF-8", ..., as_html = as_html,  : 
  Premature end of data in tag valgrindoutput line 3 [77]

This is the valgrind execution log over the rcpp_read_out_of_bound function of testSAN.

### unhandled dwarf2 abbrev form code 0x25
### unhandled dwarf2 abbrev form code 0x25
### unhandled dwarf2 abbrev form code 0x25
### unhandled dwarf2 abbrev form code 0x23
==152063== Valgrind: debuginfo reader: ensure_valid failed:
==152063== Valgrind:   during call to ML_(img_get)
==152063== Valgrind:   request for range [24992306, +4) exceeds
==152063== Valgrind:   valid image size of 731184 for image:
==152063== Valgrind:   "/home/fabri/test/testHarness/RcppDeepState/inst/testpkgs/testSAN/inst/testfiles/rcpp_read_out_of_bound/rcpp_read_out_of_bound_DeepState_TestHarness"
==152063== 
==152063== Valgrind: debuginfo reader: Possibly corrupted debuginfo file.
==152063== Valgrind: I can't recover.  Giving up.  Sorry.
==152063== 

Solution

Searching online I found in this thread that the solution for this problem is to force clang to generate source-level debug information with dwarf version 4 using -gdwarf-4 parameter to clang.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions