mirror of
https://github.com/janet-lang/janet
synced 2026-10-17 21:12:26 +00:00
Formatting.
This commit is contained in:
+5
-5
@@ -1231,16 +1231,16 @@ static Janet janet_ffi_sysv64(JanetFFISignature *signature, void *function_point
|
||||
ret_mem = alloca(type_size(signature->ret.type));
|
||||
regs[0] = (uint64_t) ret_mem;
|
||||
}
|
||||
/* GCC aligns alloca to the widest allowed vector type (32 bytes for AVX) which can pad
|
||||
* between the stack pointer and this block, but stack args start at the stack pointer,
|
||||
* so we must ask for the calling convention's 16 byte alignment */
|
||||
/* Both GCC and CLANG define GNUC. */
|
||||
/* GCC aligns alloca to the widest allowed vector type (32 bytes for AVX) which can pad
|
||||
* between the stack pointer and this block, but stack args start at the stack pointer,
|
||||
* so we must ask for the calling convention's 16 byte alignment */
|
||||
/* Both GCC and CLANG define GNUC. */
|
||||
#if defined(__GNUC__)
|
||||
uint64_t *stack = __builtin_alloca_with_align(sizeof(uint64_t) * signature->stack_count, 128);
|
||||
#else
|
||||
uint64_t *stack = alloca(sizeof(uint64_t) * signature->stack_count);
|
||||
#endif
|
||||
/* x32 pointers fill only the low half of a slot and must be zero-extended */
|
||||
/* x32 pointers fill only the low half of a slot and must be zero-extended */
|
||||
#ifdef __ILP32__
|
||||
memset(stack, 0, sizeof(uint64_t) * signature->stack_count);
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@ static Janet cfun_fuzz_fiber(int32_t argc, Janet *argv) {
|
||||
if (definition->bytecode_length <= 0) breakpoint_count = 0;
|
||||
for (int32_t index = 0; index < breakpoint_count; index++) {
|
||||
int32_t offset = ((breakpoint_control >> 4) +
|
||||
index * (breakpoint_control >> 8)) % definition->bytecode_length;
|
||||
index * (breakpoint_control >> 8)) % definition->bytecode_length;
|
||||
if (index == 0 && (breakpoint_control & 4)) offset = 0;
|
||||
breakpoints[index] = offset;
|
||||
janet_debug_break(definition, offset);
|
||||
@@ -49,7 +49,7 @@ static Janet cfun_fuzz_fiber(int32_t argc, Janet *argv) {
|
||||
status == JANET_STATUS_ERROR ||
|
||||
status == JANET_STATUS_ALIVE ||
|
||||
(status != JANET_STATUS_PENDING &&
|
||||
status != JANET_STATUS_DEBUG)) {
|
||||
status != JANET_STATUS_DEBUG)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
|
||||
int32_t step_budget = 8 + ((data[0] >> 2) & 31);
|
||||
int32_t control = ((data[0] >> 7) & 1) |
|
||||
(((data[0] >> 4) & 3) << 1);
|
||||
(((data[0] >> 4) & 3) << 1);
|
||||
int32_t breakpoint_control = data[1] | ((int32_t)data[size - 1] << 8);
|
||||
written = snprintf(source + source_length,
|
||||
sizeof(source) - source_length,
|
||||
|
||||
Reference in New Issue
Block a user