6 ms·
I'd be surprised if some combination of ASAN and UBSAN wouldn't catch this and similar dangling references
by lang4d 10mo ago
I'd be surprised if some combination of ASAN and UBSAN wouldn't catch this and similar dangling references
- steveklabnik 10mo 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 10mo agoI think you need to actually use the dangling reference: https://godbolt.org/z/f4s3fT3nM https://godbolt.org/z/f4s3fT3nM
- steveklabnik 10mo agoAh, that would make sense, yes. Thanks!