Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Zsh parser segmentation fault in strcatsub



On May 15,  8:36pm, Eduardo Bustamante wrote:
}
} dualbus@debian:~/src/zsh/zsh$ ./Src/zsh -nf strcatsub
} =================================================================
} ==2860==ERROR: AddressSanitizer: heap-buffer-overflow on address
} 0x6290000041f8 at pc 0x56236c85fac3 bp 0x7ffe5ddad580 sp
} 0x7ffe5ddad578
} READ of size 1 at 0x6290000041f8 thread T0
}     #0 0x56236c85fac2 in mb_metacharlenconv
} /home/dualbus/src/zsh/zsh/Src/utils.c:5370
}     #1 0x56236c82ee04 in dopadding /home/dualbus/src/zsh/zsh/Src/subst.c:922

So this is
	cl = MB_METACHARLENCONV(t, &cchar);
and at least from my sources the reported error is on
	STOUC(*s)
that is, on the dereference of the pointer "t" from dopadding.

Could this be an architecture endian-ness issue while trying to interpret
bytes as belonging to a multibyte character?

Can you repeat the crash with multibyte support disabled in the compile?

I don't have clang readily available to try that compiler.



Messages sorted by: Reverse Date, Date, Thread, Author