mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix memory fault on ARM-based Macs (#354)
Ksh segfaults on M1 Macs, apparently because Apple's compiler optimizer can't cope with overriding bzero(3) with libast's implementation (though it's nothing more than "memset(b, 0, n);"). Apple has disabled libast's bzero function since 2018-12-04: https://opensource.apple.com/source/ksh/ksh-27/patches/src__lib__libast__comp__omitted.c.diff.auto.html src/lib/libast/comp/omitted.c: - Only fall back to the libast bzero function if the OS lacks an implementation of bzero. - Remove the bzero undef since this fallback is only reached if the OS doesn't have bzero. NEWS: - Add compat info for macOS on ARM64. This notes that macOS Monterey can now compile and run ksh, although there is one regression test failure: builtins.sh[345]: printf %H: invalid UTF-8 characters (expected %3F%C2%86%3F%3F%3F; got %3F%C2%86%3F%3Fv%3F%3F) Thanks to @DesantBucie for the report and the testing. Resolves: https://github.com/ksh93/ksh/issues/329
This commit is contained in:
parent
a0eeb14787
commit
bfad44e56d
3 changed files with 4 additions and 3 deletions
|
|
@ -1092,9 +1092,7 @@ utime(const char* path, const struct utimbuf* ut)
|
|||
* own bsd-like macros
|
||||
*/
|
||||
|
||||
#if !_lib_bzero || defined(bzero)
|
||||
|
||||
#undef bzero
|
||||
#if !_lib_bzero
|
||||
|
||||
void
|
||||
bzero(void* b, size_t n)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue