The 10/05/2020 23:45, Jan Hubicka wrote:
> > The 10/05/2020 17:28, Szabolcs Nagy via Gcc-patches wrote:
> > minimal reproducer:
> >
> > #include <stdio.h>
> > int main()
> > {
> > int r,t;
> > r = sscanf("01", "%2x", &t);
> > printf("scanf: %d %02x\n", r, t);
> > return 0;
> > }
> >
> > should print
> >
> > scanf: 1 01
> >
> > but when glibc is compiled with gcc trunk on aarch64 it prints
> >
> > scanf: 0 00
> >
> > i will continute the debugging from here tomorrow.
>
> There is a report on glibc issue here
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97264
> it turned out to be a latent glibc bug type punning const char * and
> const unsigned char *.
>
> I wonder if it is same as problem you are seeing?
thanks, that indeed looks very similar, i'll comment on the glibc bug.