Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Unsafe transmute for pdb symbols #258

Merged
merged 2 commits into from
Aug 21, 2020

Conversation

jan-auer
Copy link
Member

@jan-auer jan-auer commented Aug 21, 2020

This works around compilation errors on nightly when casting to the generic DynIterator type. This is caused by invariant lifetimes on PDB's stream type. The transmute is actually safe since the lifetime of the data is proved to be larger than the lifetime of the derived object. However, we can avoid the transmute in the future by changing the ObjectLike trait to correct lifetimes, which will constitute a breaking change.

@jan-auer jan-auer requested a review from a team August 21, 2020 12:37
@jan-auer jan-auer self-assigned this Aug 21, 2020
@jan-auer jan-auer merged commit f56d3f4 into master Aug 21, 2020
@jan-auer jan-auer deleted the feature/unsafe-all-the-transmutes branch August 21, 2020 13:17
jan-auer added a commit that referenced this pull request Aug 21, 2020
* master:
  release: 7.5.0
  meta: Update changelog for 7.5.0
  feat: Unsafe transmute for PDB symbols (#258)
  doc: Update changelog for 7.5.0
  feat(unreal): Add unreal data bags (#257)
  fix: Mark enums as non_exhaustive (#256)
jan-auer added a commit that referenced this pull request Nov 17, 2020
* master: (22 commits)
  fix(debuginfo): Update dmsort to 1.0.1 to avoid panic due to UB (#287)
  ci: Use GHA instead of zeus (#286)
  ref: Introduce explicit NameMangling and better DemangleOptions (#275)
  meta: Bump all semver-major dependencies (#283)
  feat(demangle): Update swift demangler to 5.3 (#282)
  ref: Add File/FunctionIterator and lifetimes to DebugSession (#279)
  fix: Implement new clippy advice (#280)
  fix: Add a SymbolIterator and Lifetimes to ObjectLike trait (#277)
  ci: Switch to GitHub Actions (#273)
  ref: Introduce feature flags for demangling languages (#274)
  ref(common): Change InstructionInfo setters to Option (#272)
  ref: Remove all deprecated items (#271)
  ref: Replace failure with std::error::Error (#264)
  ref: Remove deprecated proguard support (#267)
  build: Reorganize the workspace (#266)
  build(unreal): Rename with-serde to serde (#265)
  fix(debuginfo): Detect mangled anonymous namespaces in PDB inlinees (#261)
  release: 7.5.0
  meta: Update changelog for 7.5.0
  feat: Unsafe transmute for PDB symbols (#258)
  ...
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.

None yet

2 participants