Skip to content

fix: use goblin permissive PE parse-mode#960

Merged
supervacuus merged 3 commits into
masterfrom
fix/goblin_pe_permissive_dwarf_debug
Mar 17, 2026
Merged

fix: use goblin permissive PE parse-mode#960
supervacuus merged 3 commits into
masterfrom
fix/goblin_pe_permissive_dwarf_debug

Conversation

@supervacuus

Copy link
Copy Markdown
Collaborator

This is (at least) a partial fix to getsentry/sentry#104738

As the issue above suggests, goblin was too strict when parsing stripped PE files containing primarily DWARF debug sections, because other sections were incomplete. The permissive parse mode has been extended upstream to the PE resource parser, and this update was released with goblin 0.10.5.

So this PR

  • bumps goblin to 0.10.5
  • bumps scroll to align with goblin
  • enables the permissive parse mode
  • adapts the PE object parser to upstream interface changes

Manually tested object_debug against the same debug file (and others) as in the issue:

Inspecting mingw-w64-clang-x86_64-qt6-base-debug-6.10.1-2-any/clang64/share/qt6/bin/cmake_automoc_parser.debug
File format: pe
Objects:
 - x86_64: a0af23e9-5aab-9c9a-4c4c-44205044422e-1
   code id:      692c10cb1699000
   object kind:  executable
   load address: 0x140000000
   symbol table: false
   debug info:   true
   unwind info:  true
   is malformed: false

Next step: once this is merged and released, sentry-cli should receive a symbolic bump.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread symbolic-debuginfo/src/pe.rs Outdated
@supervacuus
supervacuus force-pushed the fix/goblin_pe_permissive_dwarf_debug branch from 57b5cc4 to 600eed0 Compare March 13, 2026 15:21

@jjbayer jjbayer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@supervacuus could you turn the example you listed in the description into a test in symbolic-debuginfo/tests? Thanks!

Comment thread CHANGELOG.md Outdated
@supervacuus

Copy link
Copy Markdown
Collaborator Author

@supervacuus could you turn the example you listed in the description into a test in symbolic-debuginfo/tests?

Added here: 0e8049e

@supervacuus
supervacuus merged commit d29a143 into master Mar 17, 2026
18 checks passed
@supervacuus
supervacuus deleted the fix/goblin_pe_permissive_dwarf_debug branch March 17, 2026 08:58
@supervacuus

Copy link
Copy Markdown
Collaborator Author

@jjbayer, could we trigger a release for this fix? Then we could bump symbolic in sentry-cli as well and proceed with testing to identify any other blockers (or verify that this already resolved the issue).

@loewenheim

Copy link
Copy Markdown
Contributor

@supervacuus I just cut a release with this and #961.

loewenheim added a commit that referenced this pull request Apr 7, 2026
@loewenheim loewenheim mentioned this pull request Apr 7, 2026
loewenheim added a commit that referenced this pull request Apr 8, 2026
This reverts commit d29a143 (PR #960). The change itself is fine, but it should not have been included as part of a patch release because it breaks the public API.
szokeasaurusrex pushed a commit to getsentry/sentry-cli that referenced this pull request Apr 15, 2026
### Description

Extracted from #3237

This change was triggered by bumping `symbolic` to `12.17.3` to include
getsentry/symbolic#960.

`symbolic` updated its `zip` dependency (`2.4.2` to `7.2.0`) since the
last bump. This changed encoding internals and invalidated a bunch of
test assertions.

The PR addresses the issue in the following way:

I rewrote the affected tests so that they decode the incoming chunks and
compare their contents against the fixtures, rather than snapshotting,
which could break with every change to the encoder. I also simplified
the usage of `split_chunk_body()` a bit: now it returns a `Vec`, and
callers decide how they want to view the data: the simple tests collect
into a `HashSet` for set comparison, while the small-chunk tests use a
`SHA1` digest multimap to verify exact chunk identity and multiplicity.

If you actually wanted an early warning whether the encoding was stable,
then we can drop this PR.

Specifically, for `build_deterministic()` in
`src/utils/source_bundle.rs`, it was not entirely clear whether you want
two runs of the same version to have predictably the same output (which
I changed it to) or whether it should actually be stable across future
versions (which a `zip` crate bump upstream would break).

### Issues

Raised as part of the fix proposals for
getsentry/sentry#104738

### Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.
loewenheim added a commit that referenced this pull request May 4, 2026
This updates some dependencies which have a semver impact because some of their types are publicly exposed:
- `gimli`: 0.32.3 -> 0.33.0
- `goblin`: 0.8.0 -> 0.10.5
- `scroll`: 0.12.0 -> 0.13.0

The `goblin` part of this is just the depedency bump and minor adjustment from #960, without the use of the new feature.
supervacuus added a commit that referenced this pull request May 26, 2026
…964)

This is a follow-up to #960 and depends on an upstream change in
`goblin` that has not yet been accepted
(m4b/goblin#522).

It makes the integration of PE+DWARF debug companions into the DIF
pipeline practical (see
getsentry/sentry-cli#3240)

---------

Co-authored-by: David Herberth <[email protected]>
szokeasaurusrex pushed a commit to getsentry/sentry-cli that referenced this pull request Jun 2, 2026
### Description

Extracted from #3237

Some tests currently fail, because `symbolic` updated its `zip`
dependency (`2.4.2` to `7.2.0`) since the last bump. This changed the
encoding and invalidated a bunch of test assertions. A fix proposal for
the failing tests is #3239.

This change was triggered by bumping `symbolic` to `12.17.3` to include
getsentry/symbolic#960.

The new permissive PE parser fixes in
getsentry/symbolic#960 exposed performance edge
cases for some of the debug companions during PE import-table parsing,
the result of which neither `symbolic` nor `sentry-cli` really needs.

The PR addresses the issue in the following way:

I introduced a new `goblin` option that excludes the `PE` import table
from parsing. Of course, this requires further upstream PRs (`cargo`
points `goblin` and `symbolic` to dev branches) before we can merge
this, but I wanted to check whether you are generally in agreement with
these changes before going upstream.

Upstream changes required:

- m4b/goblin#522
- getsentry/symbolic#964


Ideally, this PR gets merged after
#3238 and
#3239, because both solve
issues this PR is affected by. If we drop or defer
#3239, we need to update all
snapshots and magic digests here first.

### Issues

At least partially fixes
getsentry/sentry#104738

### Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants