<i>(unsigned)STRING_SIZE(STRING_MAXCHARS) is 0</i> status still Open with 3 other changes
by
.
D 2022-03-22T02:10:14.356
J icomment Just\san\sobservation:\swhen\sbuilt\susing\sClang\s13.0.1\sAddressSanitizer\s(<tt>-fsanitize=address</tt>)\son\smacOS,\srunning\sthis\sexample\striggers\san\sinvalid\swrite\sin\s<tt>realloc(ptr,\s0)</tt>;\sthe\saddress\sis\sjust\sbefore\s<tt>ptr</tt>,\si.e.\slikely\sin\sthe\sASAN\schunk\sheader,\sso\sI\swonder\sif\sthis\sis\san\sASAN\sbug.\r\n\r\n<tt>realloc(ptr,\s0)</tt>\s(where\s<tt>ptr\s!=\sNULL</tt>)\sis\sexpected\sto\sbecome\sundefined\sbehavior\sin\sC23,\showever.\sShould\sTcl\stry\spreventing\sthis\sfrom\shappening\sin\se.g.\s<tt>Tcl_Realloc()</tt>,\s<tt>ckrealloc()</tt>,\setc.?
J login chrstphrchvz
J mimetype text/x-fossil-wiki
K 0e8fd6c6d5fd2f29f90c6e101197796951e399d6
U chrstphrchvz
Z 6b6fc1b6177d8e1d287d8c18e78cbf25