Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
lang4d
· 12mo ago · 0 comments
I'd be surprised if some combination of ASAN and UBSAN wouldn't catch this and similar dangling references
Comments
[–]
steveklabnik
12mo ago
I thought it should too, but it doesn't seem to, unless I made a mistake, which I probably did:
https://godbolt.org/z/Ex63vxj4r
[–]
aw1621107
11mo ago
I think you need to actually use the dangling reference:
https://godbolt.org/z/f4s3fT3nM
[–]
steveklabnik
11mo ago
Ah, that would make sense, yes. Thanks!