When cross-compiling kernel/signal.c from the Linux kernel for Vax on an i686 Linux PC the assembler crashes with memory corruption reported by libc. Using libefence turns the error into a segmentation fault. The error is caused by lines 550-552 in app.c. If the from-buffer contains more text than the space left in the to-buffer to ends up pointing after the buffer, and the next call of PUT writes beyond the end. To fix the problem something like the attached patch could be used - it just copies the check from PUT.
Created attachment 1910 [details] Patch for gas to fix memory corruption issue
Thanks! Patch applied.