/bin/csh crashes when run under Rosetta 2 on Apple Silicon

Number:rdar://FB9666962 Date Originated:
Status: Resolved:
Product: Product Version:
Classification: Reproducible:
1. Create an empty file test.c
$ touch test.c
2. Create a csh script build.csh with the following contents:
gcc -c test.c
3. Make the script executable
$ chmod +x build.csh
4. Run it 5-10 times
$ arch -x86_64 ./build.csh
csh(38245,0x2050d3e00) malloc: can't allocate region
:*** mach_vm_map(size=1048576, flags: 100) failed (error code=268435465)
csh(38245,0x2050d3e00) malloc: *** set a breakpoint in malloc_error_break to debug
Out of memory
5. You should see 2-3 error messages for every 10 runs or so


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!