Skip to content
Snippets Groups Projects

fix strict aliasing problems

Merged Vladimír Čunát requested to merge strict-aliasing into master

The (main) issue here is that char * is not allowed to alias with anyType *. With gcc-10 in Fedora this now started to cause real problems and loading stats module segfaulted.

Actually I can't see in standard (C11 6.5 par.7) that using void * is guaranteed to be correct, but at least it seems fine with gcc, and e.g. some standard functions like posix_memalign() use it in the same "dangerous" way.

EDIT: further commit deals with aliasing risks due to libuv.

Edited by Vladimír Čunát

Merge request reports

Pipeline #61311 passed with warnings

Pipeline passed with warnings for cad90154 on strict-aliasing

Approval is optional

Merged by Tomas KrizekTomas Krizek 5 years ago (Mar 23, 2020 1:35pm UTC)

Merge details

  • Changes merged into with a03568f9.
  • Deleted the source branch.
  • Auto-merge enabled

Pipeline #61476 passed with warnings

Pipeline passed with warnings for a03568f9 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply