libk  Diff

Differences From Artifact [e60df5a627]:

To Artifact [582c735deb]:

  • Executable file global/common.sh — part of check-in [e50a476efe] at 2019-08-22 02:52:20 on branch trunk — removed sneaky segfault in x86-64 syscall fn where %r8 (the register that contains the pointer to the syscall arguments from the C syscall wrapper, which need to be copied into the correct registers before the kernel is invoked) gets overwritten if the syscall valency > 5, because of overlapping ccall and syscall ABI argument registers - r8 is clobbered by argument 5 and any further attempts to use it as a ptr segfault at best. also modified the report function so that it immediate cancels compilation if a sub-process reports failure. changed allocator function signatures so they can return a condition code if the kernel reports an error; updated example code so it compiles and runs without fault. (user: lexi, size: 1780) [annotate] [blame] [check-ins using]

57
58
59
60
61
62
63

64







fi

# the following function is called to report a command invocation
# the person compiling the library. the first argument should be
# an ansi format string; this is used to color-code the tool being
# launched and thus should be different for each one.


report() { announce $@; $@; }














>
|
>
>
>
>
>
>
>
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
fi

# the following function is called to report a command invocation
# the person compiling the library. the first argument should be
# an ansi format string; this is used to color-code the tool being
# launched and thus should be different for each one.

report() {
	announce $@; $@;
	status=$?
	if test $status -ne 0; then
		args=($@)
		say "process ${args[0]} failed with status code $status"
		exit $status
	fi
}