about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-01-25 09:37:11 +0000
committerbors <bors@rust-lang.org>2016-01-25 09:37:11 +0000
commitc22cb5359fd2c9703e1c0db3a179b79c7cdb42cd (patch)
tree3c01c0b77ec638559a5aaae031fd2b1436c6ea49 /src/libstd/sys/unix/stack_overflow.rs
parent6866f1361debf5857856ff95eeee806bb7bea738 (diff)
parentd9426210b197cb0be1db9838342349f38db135e3 (diff)
downloadrust-c22cb5359fd2c9703e1c0db3a179b79c7cdb42cd.tar.gz
rust-c22cb5359fd2c9703e1c0db3a179b79c7cdb42cd.zip
Auto merge of #31176 - frewsxcv:incorrect-pass-kind, r=dotdash
Register LLVM passes with the correct LLVM pass manager.

LLVM was upgraded to a new version in this commit:

https://github.com/rust-lang/rust/commit/f9d4149c29e8b989fa3624993be379f380e48dcf

which was part of this pull request:

https://github.com/rust-lang/rust/issues/26025

Consider the following two lines from that commit:

https://github.com/rust-lang/rust/commit/f9d4149c29e8b989fa3624993be379f380e48dcf#diff-a3b24dbe2ea7c1981f9ac79f9745f40aL462

https://github.com/rust-lang/rust/commit/f9d4149c29e8b989fa3624993be379f380e48dcf#diff-a3b24dbe2ea7c1981f9ac79f9745f40aL469

The purpose of these lines is to register LLVM passes. Prior to the that
commit, the passes being handled were assumed to be ModulePasses (a
specific type of LLVM pass) since they were being added to a ModulePass
manager. After that commit, both lines were refactored (presumably in an
attempt to DRY out the code), but the ModulePasses were changed to be
registered to a FunctionPass manager. This change resulted in
ModulePasses being run, but a Function object was being passed as a
parameter to the pass instead of a Module, which resulted in
segmentation faults.

In this commit, I changed relevant sections of the code to check the
type of the passes being added and register them to the appropriate pass
manager.

Closes https://github.com/rust-lang/rust/issues/31067
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions