[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: undefined sanitizer [was: fixes for running on centos7 under docker]


On Wednesday, 18 April 2018 09:38:24 CEST Nikos Mavrogiannopoulos wrote:
> On Tue, 2018-04-17 at 18:02 +0200, Andreas Schneider wrote:
> > On Friday, 13 April 2018 10:53:12 CEST Nikos Mavrogiannopoulos wrote:
> > > Hi,
> > 
> > Hi Nikos,
> > 
> > >  These small fixes are needed for running the testsuite under
> > > 
> > > docker
> > > and under centos7.
> > 
> > Thank you very much for your contributions. I've pushed it to master.
> 
> Thank you.

Thanks for the patch Nikos. 
 
> One more fix for an issue I saw when running with undefined sanitizer
> is attached. That fixes undefined behavior, though in practice from
> what I see it shouldn't cause any problems.
> 
> What I saw but didn't fix is an error when compiled with
> -fsanitize=bounds-strict at this struct:
> 
> struct ssh_string_struct {
>         uint32_t size;
>         unsigned char data[1];
> }

We use this trick to reduce the size of the struct. If you look at the header 
it is getting packed too.


	Andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                asn@xxxxxxxxxxxxxx



References:
fixes for running on centos7 under dockerNikos Mavrogiannopoulos <nmav@xxxxxxxxxx>
Re: fixes for running on centos7 under dockerAndreas Schneider <asn@xxxxxxxxxxxxxx>
undefined sanitizer [was: fixes for running on centos7 under docker]Nikos Mavrogiannopoulos <nmav@xxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org