Add an error DEBUG trace in exraise() (when the shell has detected
some error or signal, and is aborting what it is doing)
Fix an arith error in DEBUG bit assignments (harmless as we haven't
reached the limit of flags yet), and add some missing (recently added)
debug flags so they are turned on when the user (ie: me) asks for
"everything".
(PS1 etc) which, if the shell were already exiting, and a prompt
were to be expanded (which only really happens if -x is enabled,
and an exit trap is set, so the commands in the trap need PS4
expanded and written, last thing, before the shell exits) the shell
would instead simply exit when it finished expanding PS4 (before
even writing it, or the xtrace output).
There were more conditions required to set up the environment for
this to actually occur (it seems to only happen when the exit trap
is set in a function, called in a command substitution) but that's
unimportant, the code was nonsense.
Problem noticed by Martijn Dekker.
XXX pullup -8
(which means this is the very first execution in a new subshell)
clear the traps completely, unless the command is "trap". We were
allowing any special builtin, which was probably harmless, but not
intended.
Also (though not required) permit "command trap" and "eval trap"
and combinations thereof, because they might be useful, and there is
no particular reason why not. This is all a part of making t=$(trap)
work as POSIX requires, but almost nothing beyond that. The "trap"
command must be alone (modulo eval and command) in the subshell for
the exception to apply, no t=$(trap; echo) or anything like that.
Martijn Dekker asked for "command trap" to work (no idea why though,
it converts "trap" from being a special builtin, to a normal one,
which means an error won't cause the shell to exit ... if there's
an error, the "trap" command won't do anything useful, and as we
permit no more commands (for this special treatment) the shell is
going to exit anyway, this difference is not really significant.
RANDOM initialisation failed
when the shell might print after RANDOM has been reseeded
(which includes at sh startup) the next time RANDOM is accessed.
It indicates that /dev/urandom was not available or did not
provide data - in that case, sh uses a (weak) seed made out of
the pid and time (but otherwise nothing else changes).
one in the "safe" way (it was ensuring the buffer always ended in 2 \0
characters ... one is enough.) This could affect the expansions of
LINENO RANDOM and SECONDS, though only if they have at least 8 digits
(and then, only sometimes). RANDOM thus is safe, as it never produces
a number with more than 5 digits, you'd need a script with 10000000
lines before there might be an issue with LINENO (and even autoconf
generated scripts don't generally get that bit) and a shell would need
to be running for almost 4 months for SECONDS to climb that high.
Nevertheless: XXX pullup -8.
when the locale is ru_RU.UTF-8 (which has ',' as its decimal radix char).
Inspired by a problem with rc.subr experiened by ru_RU.UTF-8 reported on
netbsd-users. These are in the "fraction" test case.
While here, add some more (sub-)tests of invalid input, to make sure they
fail (in the "nonnumeric" test case), and for fun, a couple of subtests
testing hex input fractional delays (in the "hex" test case).
XXX arm_icache_sync_range() and mips_icache_sync_range() call
(void)rumpcomp_sync_icache((void *)va, (uint64_t)sz);
but linking fails if I do the same on aarch64 (I suspect it also
fails on 32bit arm and mips).
As a workaround, I call __builtin___clear_cache().
Changes since the last import:
r333 More x86 fixes and a new stack test.
r332 Improve stack allocation on x86.
r331 Make sljit_free_unused_memory_exec public, PPC flush takes priority.
r330 Reverse the stack utility to top-down.
r329 Add sljit_set_current_flags function.
r328 Add two more virtual registers to x86/32, ARM-32 refactor.
r327 Remove value caching on ARM-32.
r326 Remove value caching on ARM-Thumb2.
r325 Move with update rework.
r324 Arm32 store fixes.
r323 Update macros and remove copyright years.
r322 Reworking flags, removing keep flags.
r321 Quick fix for regexjit.
r320 Improve protected executable allocator. Patch insipred by Christian Persch.
r319 Fully support dynamic code modifications again.
r318 Support protected allocator on all architectures except TILEGX.
r317 Rework protected allocator, only x86 linux is supported now.
r316 Add protected executable allocator.
r315 Remove SLJIT_MEMMOVE.
r314 Fix unaligned accesses on x86. Patch by Marc Mutz.
tftproot_getfile() must return something != 0 to indicate error when
the bootfile is to long.
error just got set to 0 when nfs_boot_setrecvtimo() was called.
found during code review. compile tested only.
* Handle the FPU differently, limit the states via the given mask rather
than via XCR0. Align to 64 bytes. Provide an initial gXCR0, to be sure
that XCR0_X87 is set. Reset XSTATE_BV when the state is modified by
the virtualizer, to force a reload from memory.
* Hide RDTSCP.
* Zero-extend RBX/RCX/RDX when handling the NVMM CPUID signature.
* Take ECX and not RCX on MSR instructions.