Commit 10ed050
authored
[libc][CPP] make the string trap on OOM (#172260)
This PR makes the string trap on OOM.
Previously, the `__builtin_unreachable` has made debugging tricky as it
makes the control flow of OOM as an undefined behavior.
We can run into OOM with testing configuration easily where memory is
statically bounded.
We did not settle with the best solution of this but making it trap is
at least better than UB
in this case.1 parent a6f837e commit 10ed050
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | | - | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
142 | 145 | | |
143 | 146 | | |
144 | 147 | | |
| |||
0 commit comments