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

analyze: misc fixes for lighttpd buffer (part 1/2) #1178

Merged
merged 5 commits into from
Dec 6, 2024

Conversation

spernsteiner
Copy link
Collaborator

Various small fixes for lighttpd's buffer module:

  • In rewrite::expr::mir_op, skip generating casts for Deref projections on FIXED pointers
  • In borrowck, don't treat StorageLive/StorageDead as uses (which would invalidate loans)
  • In rewrite::ty::HirTyVisitor, add a missing walk_stmt call. This was causing type rewrites to be skipped in some places.
  • In rewrite::expr::mir_op, add a conversion from &[T] to &T before dereferencing if needed. This can happen in cases like p.offset(...); x = *p; because *p uses p directly, which has the OFFSET permission due to the previous p.offset() call, instead of copying p into a temporary, which would not need the OFFSET permission.
  • In GlobalAnalysisCtxt::fn_analysis_invalid, ignore the flag DontRewriteFnReason::REWRITE_INVALID, since rewriting errors don't affect the validity of the analysis results.

@spernsteiner spernsteiner requested a review from ahomescu December 2, 2024 21:44
@spernsteiner spernsteiner force-pushed the analyze-buffer-misc-fixes branch from 45ecfff to b8773cc Compare December 6, 2024 17:43
@spernsteiner spernsteiner force-pushed the analyze-buffer-misc-fixes-base branch from e2aee20 to b069bb6 Compare December 6, 2024 17:43
@spernsteiner spernsteiner changed the base branch from analyze-buffer-misc-fixes-base to master December 6, 2024 17:44
@spernsteiner spernsteiner merged commit 78c32c5 into master Dec 6, 2024
8 checks passed
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.

2 participants