3 ms·
I'd be surprised if some combination of ASAN and UBSAN wouldn't catch this and similar dangling references
by lang4d 1y ago
I'd be surprised if some combination of ASAN and UBSAN wouldn't catch this and similar dangling references
- steveklabnik 1y agoI thought it should too, but it doesn't seem to, unless I made a mistake, which I probably did: https://godbolt.org/z/Ex63vxj4r https://godbolt.org/z/Ex63vxj4r
- aw1621107 1y agoI think you need to actually use the dangling reference: https://godbolt.org/z/f4s3fT3nM https://godbolt.org/z/f4s3fT3nM
- steveklabnik 1y agoAh, that would make sense, yes. Thanks!