aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-ast-resolve-expr.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-07-08 14:54:37 +0100
committerPhilip Herron <philip.herron@embecosm.com>2022-07-15 11:58:23 +0100
commit81c4b6989f044a45455717b752cafb96f04b768e (patch)
tree84ef2eda81057f81cd87997d779d7209059e6fe4 /gcc/rust/resolve/rust-ast-resolve-expr.cc
parentf51284b598863eb0cbeb2984fd1499a672f2191d (diff)
downloadgcc-81c4b6989f044a45455717b752cafb96f04b768e.zip
gcc-81c4b6989f044a45455717b752cafb96f04b768e.tar.gz
gcc-81c4b6989f044a45455717b752cafb96f04b768e.tar.bz2
Fix undefined behaviour using .get on unique_ptr
As the move semantics for AST and HIR crates are unsafe on older compilers we are working around this by storing the pointer into the mappings class this was using the get method to store the pointer. The issue for loading extern crates the unique_ptr goes out of scope and this the deletion code resulting in undefined behaviour. This changes it to call release to take full ownership of the pointer as we expect.
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-expr.cc')
0 files changed, 0 insertions, 0 deletions