Re: [PATCH] trace2: tolerate failed timestamp formatting
Derrick Stolee <[email protected]> Fri, 31 Jul 2026 09:26:38 -0400
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
On 7/29/2026 5:35 PM, Junio C Hamano wrote: > Junio C Hamano <[email protected]> writes: > >> Derrick Stolee <[email protected]> writes: >> >>>> Would it make more sense to fix the xsnprintf()/libintl boundary and >>>> treat Trace2 reentrancy separately? I still can't explain why the >>>> allocation failed, so there may be another GfW-specific piece I’m >>>> missing. >>> >>> I think that your suggested change has merits and should be pursued. >>> I'll explore it a bit to confirm. >> >> That band-aid may be a good idea, but I would prefer not to see the >> conditional in a common source file like 'wrapper.c'. Somewhere >> MinGW-specific would be more appropriate, would it not? > > Did anything come out of this discussion? Sorry that I've been unavailable to come back to this thread, but here is what I've learned in the meantime: * Taylor's hunch that the memory allocation is more likely at fault is seeming more and more correct. When we fixed this issue, other issues around memory allocation came to light. * For that reason, I'll rework this patch to point at the allocation as the likely reason the parsing fails. Avoiding a die() in the tracing code is still critical. * Thus, I'll also replace the xstrdup() in the trace code to avoid a die() due to allocation problems. * I will take a deeper look at this wrapper change and how it might be done in a careful way, as Taylor says his patch was an example only and not the "right" way to do it. Thanks, -Stolee