Commit 95b1763
Add a DCHECK that ArenaStringPtr::Set(char*, Arena*) is not called with
a null char* argument.
This is already undefined behavior since the argument is immediately
used to construct a string_view, and passing a null argument to the
single-arg string_view constructor is undefined behavior. Adding the
check will prevent introduction of new bugs when using standard
library implementations that do not detect this case.
PiperOrigin-RevId: 7871784361 parent 0b31c2a commit 95b1763
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| 465 | + | |
465 | 466 | | |
466 | 467 | | |
467 | 468 | | |
| |||
0 commit comments