On Tue, Jun 08, 2021 at 11:41:29AM +0200, Tim Düsterhus wrote:
> Willy,
> 
> On 6/8/21 11:26 AM, Willy Tarreau wrote:
> > I couldn't figure how the VTC was OK but not testing it by hand. I finally
> > found it, the outlen variable was not initialized, it should contain the
> > size of the allocated area for the output, so if there was some dirt in
> > the stack, it would use that and be happy, but when run by hand it had
> > zero, hence the message above :-)
> 
> Good catch, thanks! This mistake was part of my initial patch. I'll note
> that I should read the function documentation more carefully.

I wouldn't have noticed it if it hadn't failed.

> Reproducing the issue locally it appears that the variable always contains a
> Unix timestamp for me.

That's large enough :-)

> However I'm surprised that valgrind does not detect the issue. Usually it's
> able to detect the use of uninitialized memory within a conditional
> expression.

It's normal, it's in the stack and that location was already used before
if you find anything else.

> Anyway: Thanks for fixing the issue and taking the series. I've marked the
> GitHub issue as fixed and closed it.

Fine! I think we could improve run-regtests.sh to make use of it now
for the version checks and possibly even for some features. But no rush,
and if in the short term we end up improving logical expressions maybe
we'll find it convenient to be able to simply place a global condition
in each test. Time will tell.

Willy

Reply via email to