fix: use goblin permissive PE parse-mode#960
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
fa50088 to
57b5cc4
Compare
57b5cc4 to
600eed0
Compare
jjbayer
left a comment
There was a problem hiding this comment.
@supervacuus could you turn the example you listed in the description into a test in symbolic-debuginfo/tests? Thanks!
Co-authored-by: Joris Bayer <[email protected]>
Added here: 0e8049e |
|
@jjbayer, could we trigger a release for this fix? Then we could bump |
|
@supervacuus I just cut a release with this and #961. |
This reverts commit d29a143.
### 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.
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.
…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]>
### 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.

This is (at least) a partial fix to getsentry/sentry#104738
As the issue above suggests,
goblinwas too strict when parsing strippedPEfiles containing primarilyDWARFdebug sections, because other sections were incomplete. The permissive parse mode has been extended upstream to thePEresource parser, and this update was released withgoblin0.10.5.So this PR
goblinto 0.10.5scrollto align withgoblinManually tested
object_debugagainst the same debug file (and others) as in the issue:Next step: once this is merged and released,
sentry-clishould receive asymbolicbump.