Page MenuHomeFreeBSD

arichardson (Alexander Richardson)
User

Projects

User Details

User Since
Jan 17 2017, 2:21 PM (457 w, 1 d)

Recent Activity

Mon, Oct 13

arichardson added reviewers for D52526: cross-build: fix bootstrap with clang 19 on glibc systems: jhb, markj.
Mon, Oct 13, 3:14 PM

Sep 17 2025

arichardson updated the summary of D52528: libthr: fix -Wunterminated-string-initialization.
Sep 17 2025, 7:39 AM
arichardson added a comment to D52528: libthr: fix -Wunterminated-string-initialization.

commit message disagrees with __nonstring?

Sep 17 2025, 7:38 AM
arichardson added a comment to D52563: bmake: Fix -Wunterminated-string-initialization.
In D52563#1200450, @sjg wrote:

No need for a comment, I committed the following upstream:

Index: var.c
===================================================================
RCS file: /cvsroot/src/usr.bin/make/var.c,v
retrieving revision 1.1171
diff -u -p -r1.1171 var.c
--- var.c       29 Jun 2025 11:02:17 -0000      1.1171
+++ var.c       16 Sep 2025 15:13:28 -0000
@@ -1850,7 +1850,7 @@ QuoteShell(const char *str, bool quoteDo
 static char *
 Hash(const char *str)
 {
-       static const char hexdigits[16] = "0123456789abcdef";
+       static const char hexdigits[] = "0123456789abcdef";
        const unsigned char *ustr = (const unsigned char *)str;
 
        uint32_t h = 0x971e137bU;
Sep 17 2025, 7:35 AM

Sep 16 2025

arichardson requested review of D52568: netmap: silence -Wdefault-const-init-field-unsafe warning.
Sep 16 2025, 5:32 AM
arichardson added a comment to D52526: cross-build: fix bootstrap with clang 19 on glibc systems.

Okay it looks like musl does not have the weird char* strerror_r: https://git.musl-libc.org/cgit/musl/tree/include/string.h#n66, so it will need to be conditional on glibc.

Sep 16 2025, 12:27 AM
arichardson added inline comments to D52526: cross-build: fix bootstrap with clang 19 on glibc systems.
Sep 16 2025, 12:26 AM
arichardson added inline comments to D52543: if_ovpn.c: fix use of uninitialized variable.
Sep 16 2025, 12:22 AM
arichardson added inline comments to D52543: if_ovpn.c: fix use of uninitialized variable.
Sep 16 2025, 12:00 AM

Sep 15 2025

arichardson updated the diff for D52532: libfetch: Fix -Wunterminated-string-initialization.

rebase

Sep 15 2025, 11:33 PM
arichardson updated the diff for D52528: libthr: fix -Wunterminated-string-initialization.

rebase

Sep 15 2025, 11:33 PM
arichardson updated the diff for D52535: rtld: silence clang's unterminated-string-initialization warning.

rebase

Sep 15 2025, 11:33 PM
arichardson requested review of D52565: cdefs.h: Introduce __nonstring attribute.
Sep 15 2025, 11:24 PM
arichardson updated the diff for D52535: rtld: silence clang's unterminated-string-initialization warning.

rebase

Sep 15 2025, 11:20 PM
arichardson committed rG34a006eaa39c: libc++: silence -Wnontrivial-memaccess warning with newer clang (authored by arichardson).
libc++: silence -Wnontrivial-memaccess warning with newer clang
Sep 15 2025, 10:36 PM
arichardson committed rG086ce467adec: libc++: Fix deprecation warnings with latest clang (authored by arichardson).
libc++: Fix deprecation warnings with latest clang
Sep 15 2025, 10:36 PM
arichardson committed rGdee76cf2f3da: libc++: avoid use of deprecated __reference_binds_to_temporary (authored by arichardson).
libc++: avoid use of deprecated __reference_binds_to_temporary
Sep 15 2025, 10:36 PM
arichardson committed rGd61c75f634cf: libc++: avoid use of deprecated builtin (authored by arichardson).
libc++: avoid use of deprecated builtin
Sep 15 2025, 10:36 PM
arichardson closed D52534: libc++: silence -Wnontrivial-memaccess warning with newer clang.
Sep 15 2025, 10:36 PM
arichardson closed D52531: libc++: Fix deprecation warnings with latest clang.
Sep 15 2025, 10:35 PM
arichardson closed D52530: libc++: avoid use of deprecated __reference_binds_to_temporary.
Sep 15 2025, 10:35 PM
arichardson closed D52529: libc++: avoid use of deprecated builtin.
Sep 15 2025, 10:35 PM
arichardson requested review of D52563: bmake: Fix -Wunterminated-string-initialization.
Sep 15 2025, 10:23 PM
arichardson added a comment to D52531: libc++: Fix deprecation warnings with latest clang.

Note: This patch should be a separate commit and not merged.
For testing purposes they are combined.

This seems confusing in the commit message

Sep 15 2025, 10:13 PM
arichardson committed rG969be39fb3ca: if_ovpn.c: fix use of uninitialized variable (authored by arichardson).
if_ovpn.c: fix use of uninitialized variable
Sep 15 2025, 10:10 PM
arichardson committed rG90234b9dd8cb: riscv: Provide prototypes for fpgetmask/fpsetmask (authored by arichardson).
riscv: Provide prototypes for fpgetmask/fpsetmask
Sep 15 2025, 10:10 PM
arichardson closed D52543: if_ovpn.c: fix use of uninitialized variable.
Sep 15 2025, 10:10 PM
arichardson closed D52035: riscv: Provide prototypes for fpgetmask/fpsetmask.
Sep 15 2025, 10:10 PM
arichardson added inline comments to D52530: libc++: avoid use of deprecated __reference_binds_to_temporary.
Sep 15 2025, 7:10 PM
arichardson updated the diff for D52528: libthr: fix -Wunterminated-string-initialization.

silence warning instead

Sep 15 2025, 6:38 AM
arichardson requested review of D52543: if_ovpn.c: fix use of uninitialized variable.
Sep 15 2025, 4:31 AM

Sep 14 2025

arichardson requested review of D52535: rtld: silence clang's unterminated-string-initialization warning.
Sep 14 2025, 11:21 PM
arichardson requested review of D52534: libc++: silence -Wnontrivial-memaccess warning with newer clang.
Sep 14 2025, 11:10 PM
arichardson requested review of D52533: libcuse: silence -Wthread-safety-analysis warnings.
Sep 14 2025, 11:03 PM
arichardson requested review of D52532: libfetch: Fix -Wunterminated-string-initialization.
Sep 14 2025, 10:56 PM
arichardson requested review of D52531: libc++: Fix deprecation warnings with latest clang.
Sep 14 2025, 10:54 PM
arichardson requested review of D52530: libc++: avoid use of deprecated __reference_binds_to_temporary.
Sep 14 2025, 10:45 PM
arichardson requested review of D52529: libc++: avoid use of deprecated builtin.
Sep 14 2025, 10:37 PM
arichardson requested review of D52528: libthr: fix -Wunterminated-string-initialization.
Sep 14 2025, 10:28 PM
arichardson requested review of D52526: cross-build: fix bootstrap with clang 19 on glibc systems.
Sep 14 2025, 9:09 PM
arichardson updated the diff for D52041: sys: Make priority.h and rtprio.h include all dependencies.

avoid sys/types.h includes, and update test list

Sep 14 2025, 7:50 PM

Aug 20 2025

arichardson added a comment to D52041: sys: Make priority.h and rtprio.h include all dependencies.
In D52041#1188826, @imp wrote:

Do you need sys/types.h, or sys/_types.h? The latter has less namespace pollution...

And if these are on the excluded list for check headers for buildworld, please remove them.

Aug 20 2025, 8:45 PM
arichardson added a comment to D52041: sys: Make priority.h and rtprio.h include all dependencies.
In D52041#1188826, @imp wrote:

Do you need sys/types.h, or sys/_types.h? The latter has less namespace pollution...

And if these are on the excluded list for check headers for buildworld, please remove them.

Aug 20 2025, 8:41 PM
arichardson requested review of D52041: sys: Make priority.h and rtprio.h include all dependencies.
Aug 20 2025, 4:28 AM
arichardson added a reviewer for D52035: riscv: Provide prototypes for fpgetmask/fpsetmask: riscv.
Aug 20 2025, 12:26 AM
arichardson requested review of D52035: riscv: Provide prototypes for fpgetmask/fpsetmask.
Aug 20 2025, 12:26 AM

Aug 5 2025

arichardson accepted D51653: cross-build make.py: Handle lld brew packages on macOS.
Aug 5 2025, 11:13 PM

Aug 4 2025

arichardson accepted D51653: cross-build make.py: Handle lld brew packages on macOS.

This looks sensible to me. One suggestion would be to avoid the manual caching.

Aug 4 2025, 8:12 PM

Aug 26 2024

arichardson committed rG04262ed78d23: rtld-elf: Add CFI annotation for .rtld_start on RISC-V (authored by arichardson).
rtld-elf: Add CFI annotation for .rtld_start on RISC-V
Aug 26 2024, 4:54 AM
arichardson closed D46406: rtld-elf: Add CFI annotation for .rtld_start on RISC-V.
Aug 26 2024, 4:53 AM

Aug 23 2024

arichardson added inline comments to D46404: lib/csu/riscv: Remove separate assembly startup file.
Aug 23 2024, 9:59 PM
arichardson abandoned D39916: mi_startup: sort sysinit array using qsort instead of bubble sort.
Aug 23 2024, 9:57 PM

Aug 22 2024

arichardson added inline comments to D46400: [RISC-V] Set ra to zero when calling into userspace.
Aug 22 2024, 5:54 PM
arichardson added inline comments to D46400: [RISC-V] Set ra to zero when calling into userspace.
Aug 22 2024, 5:50 PM
arichardson added a comment to D46403: Introduce vfcntl(), a va_list variant of fcntl().
In D46403#1057654, @kib wrote:
In D46403#1057619, @kib wrote:

Could it be simplified by providing an fcntl variant that takes the third arg unconditionally, instead?

I would also be happy with that approach, just assumed this variant would be more flexible. Would the unconditional one look like this: fcntl2(int, int, __intptr_t)?

The actual syscall takes three args unconditionally, so there is no point in adding more complications IMO. By existing conventions, the function perhaps should be called fcntl3.

Actually, I just remembered this would not help with the interposing of fcntl since the interposer would still need to extract the variadic argument.

Well, fcntl would call fcntl3, and you can then interpose the latter, just as with vfcntl.

Aug 22 2024, 5:38 PM
arichardson added a comment to D46403: Introduce vfcntl(), a va_list variant of fcntl().
In D46403#1057654, @kib wrote:
In D46403#1057619, @kib wrote:

Could it be simplified by providing an fcntl variant that takes the third arg unconditionally, instead?

I would also be happy with that approach, just assumed this variant would be more flexible. Would the unconditional one look like this: fcntl2(int, int, __intptr_t)?

The actual syscall takes three args unconditionally, so there is no point in adding more complications IMO. By existing conventions, the function perhaps should be called fcntl3.

Aug 22 2024, 5:48 AM

Aug 21 2024

arichardson updated the diff for D46404: lib/csu/riscv: Remove separate assembly startup file.

review comments

Aug 21 2024, 11:17 PM
arichardson added inline comments to D46404: lib/csu/riscv: Remove separate assembly startup file.
Aug 21 2024, 11:16 PM
arichardson added a comment to D46403: Introduce vfcntl(), a va_list variant of fcntl().

there
is currently no portable way to interpose a variadic function without
relying on undefined behaviour

That's not entirely true, but it requires you to know how many arguments were passed in every possible case, what types they are, va_arg them in turn and call the interposed function with those arguments (or more). Whereas interposing a function that takes the va_list itself means you only need to interpret the arguments in the cases where you actually want to inspect at them.

Aug 21 2024, 10:58 PM
arichardson added a comment to D46403: Introduce vfcntl(), a va_list variant of fcntl().
In D46403#1057619, @kib wrote:

Could it be simplified by providing an fcntl variant that takes the third arg unconditionally, instead?

Aug 21 2024, 10:57 PM
arichardson updated the summary of D46405: lib/csu/riscv: Mark ra as undefined in _start.
Aug 21 2024, 10:42 PM
arichardson requested review of D46406: rtld-elf: Add CFI annotation for .rtld_start on RISC-V.
Aug 21 2024, 10:39 PM
arichardson requested review of D46405: lib/csu/riscv: Mark ra as undefined in _start.
Aug 21 2024, 10:37 PM
arichardson requested review of D46404: lib/csu/riscv: Remove separate assembly startup file.
Aug 21 2024, 10:35 PM
arichardson requested review of D46403: Introduce vfcntl(), a va_list variant of fcntl().
Aug 21 2024, 9:12 PM
arichardson added a reviewer for D46400: [RISC-V] Set ra to zero when calling into userspace: riscv.
Aug 21 2024, 6:57 PM
arichardson updated the diff for D46400: [RISC-V] Set ra to zero when calling into userspace.

Also zero fp

Aug 21 2024, 6:57 PM
arichardson added a comment to D46400: [RISC-V] Set ra to zero when calling into userspace.

Should we also do fp/s0 to match, like arm64 does?

Aug 21 2024, 6:54 PM
arichardson requested review of D46400: [RISC-V] Set ra to zero when calling into userspace.
Aug 21 2024, 5:29 PM

Jul 8 2024

arichardson added a comment to D45891: rtld: actually resolve memcpy plt.

No sure how much the builtins optimization matters here but if it does the other workaround would be:

Jul 8 2024, 5:39 PM

Jun 17 2024

arichardson added a comment to D44893: Simplify signal handling code in libthr by removing use of SYS_sigreturn.

It looks like removing this call to memcpy might actually also fix the TSan issue I tried to work around in https://reviews.freebsd.org/D28536. Might be time to try run the TSan testsuite again.

Jun 17 2024, 11:10 PM

May 2 2024

arichardson accepted D44216: Make WITHOUT_UNDEFINED_VERSION the default.
May 2 2024, 6:30 AM
arichardson added inline comments to D45052: libgcc_s: __extendxftf2 and __trunctfxf2 are amd64-only.
May 2 2024, 6:28 AM

May 1 2024

arichardson added a comment to D45034: libgcc_s: Don't build __extendxftf2 and __trunctfxf2.

They should build for x86, that was the whole point of the upstream changes (supporting ieee 128-bit float in addition to ld80)

May 1 2024, 1:06 AM
arichardson accepted D45028: libgcc_s: 80-bit long double function are x86-only.
May 1 2024, 1:05 AM

Mar 28 2024

arichardson added inline comments to D28253: Remove all current uses of build-tools during buildworld.
Mar 28 2024, 6:20 AM
arichardson added a comment to D44537: csh: Use HOST_CC when compiling hostprog used by csh build.

Thanks for working on this. This reminds me of my efforts a few years ago to avoid the build-tools awkwardness: https://reviews.freebsd.org/D28253.

Mar 28 2024, 6:15 AM

Mar 6 2024

arichardson added inline comments to D44253: timerfd_create: accept CLOCK_UPTIME/CLOCK_BOOTTIME.
Mar 6 2024, 10:32 PM

Feb 25 2024

arichardson added a comment to D44030: llvm: implement the bits missing for LSan on FreeBSD.

Have you tried running the lsan test suite with this change?

I'm working on it, but just trying to get the llvm test suite running has been... rough. I chose to redirect from your question to the tangentially related and still valuable: "Have you tried running the asan test suite with this change?" since we can know how much of the asan test suite has passed already.

After fumbling around and finally figuring out that I needed to configure llvm/ with -DLLVM_ENABLE_PROJECTS="clang;compiler-rt" because some of the test prereqs are in llvm or clang, most of the tests that actually run fail because they're trying to do something like:

22:56 <@kevans91_>  70252 103012 Asan-aarch64-inline CALL  execve(0,0x81278f78,0x81278f98)
22:56 <@kevans91_>  70252 103012 Asan-aarch64-inline RET   execve -1 errno 9 Bad file descriptor

... and this is the realization that I just burned a not-insignificant chunk of time because this hasn't been upstreamed yet, three months later: https://cgit.freebsd.org/src/commit/?id=4c9a0adad18263ec8725d9bfc5f560c6ad1da8bd

Feb 25 2024, 4:42 AM

Feb 23 2024

arichardson added a comment to D44030: llvm: implement the bits missing for LSan on FreeBSD.

Have you tried running the lsan test suite with this change?

Feb 23 2024, 9:37 PM

Feb 2 2024

arichardson added a comment to D43498: devel/evdev: Forward to dev/evdev headers where possible.

For example the linux joystick.h defines a bunch of ioctls that I don't see implemented on FreeBSD, so we really shouldn't claim support for it? Maybe the header should only includes the constants?

Feb 2 2024, 1:57 AM
arichardson added a comment to D43498: devel/evdev: Forward to dev/evdev headers where possible.

input-event-codes.h hasn't changedu pstream in 4 years (perhaps "of course" because it's a tagged release) but if wulf@ says that that one should be obtained upstream, then that seems reasonable. There's no meaningful difference between the base-system-provided version and upstream that I can see -- it's all defines of constants. One concern I have is that we stopped using base-system headers at some point -- at least that's how I remember it -- because the dev/evdev/ headers were not meant for user-space consumption. I can't find that in ports commit history, though, so maybe I'm dreaming it.

Feb 2 2024, 1:54 AM

Jan 30 2024

arichardson added a comment to D43254: libc: Remove support for pre-C11 C standards.

Commit message should probably be qualified with "for kernel compilation"?

Jan 30 2024, 12:03 AM · Contributor Reviews (src)
arichardson accepted D43237: Use gnu17 for buildworld.

This LGTM but the commit message should also include the minimum Clang+GCC versions

Jan 30 2024, 12:01 AM · Contributor Reviews (src)
arichardson accepted D43236: tcp_wrappers: Use default C standard version.
Jan 30 2024, 12:00 AM · Contributor Reviews (src)

Jan 29 2024

arichardson added a comment to D43498: devel/evdev: Forward to dev/evdev headers where possible.

ping?

Jan 29 2024, 11:55 PM

Jan 18 2024

arichardson requested review of D43498: devel/evdev: Forward to dev/evdev headers where possible.
Jan 18 2024, 6:03 PM

Jan 14 2024

arichardson added a comment to D43426: cdefs: Introduce __result_use_or_ignore_check.

Based on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425#c56 we can use [[nodiscard]] with GCC 11 and higher which has the expected semantics. But for now this change seems fine

Jan 14 2024, 12:36 AM
arichardson accepted D43443: build: Use ls -i | cut rather than stat -f %i to extract inode.

Both of these features are required by POSIX, %% also seems to be required:
https://pubs.opengroup.org/onlinepubs/009604499/utilities/xcu_chap02.html#tag_02_06_02

Jan 14 2024, 12:13 AM

Jan 12 2024

arichardson accepted D43409: Stop using expressions in _Alignof().
Jan 12 2024, 4:06 AM · Contributor Reviews (src)

Jan 2 2024

arichardson added inline comments to D43237: Use gnu17 for buildworld.
Jan 2 2024, 9:46 PM · Contributor Reviews (src)
arichardson added a comment to D43239: Use gnu17 for buildkernel.

Looking at the Clang change that added -std=c17 (https://github.com/llvm/llvm-project/commit/5b6c0f75e01571851b767dc63a3229c962f464f1), the only difference is the value of __STDC_VERSION__, so unless code uses this in preprocessor macros it's identical to -std=c11

Jan 2 2024, 9:34 PM · Contributor Reviews (src)
arichardson added a comment to D43239: Use gnu17 for buildkernel.

I had a look on godbolt to see which compiler versions support c17: https://godbolt.org/z/EGd4TqP3j

Jan 2 2024, 9:20 PM · Contributor Reviews (src)
arichardson committed rG30887c7d48ea: kldxref: fix bootstrapping on Linux with Clang 16 (authored by arichardson).
kldxref: fix bootstrapping on Linux with Clang 16
Jan 2 2024, 7:12 PM

Dec 31 2023

arichardson added a comment to D43239: Use gnu17 for buildkernel.

Overall I'd be very happy to see the standard bumped to c17 but I'm not sure what the current minimum compiler versions are. But then again maybe it's time to say you need a c17 compiler for current...

Dec 31 2023, 6:18 AM · Contributor Reviews (src)

Dec 12 2023

arichardson committed rG60e845ceef25: jevents: fix bootstrapping on Linux with Clang 16 (authored by arichardson).
jevents: fix bootstrapping on Linux with Clang 16
Dec 12 2023, 5:16 AM
arichardson committed rG0156465c6d11: mandoc: fix bootstrapping on Linux with Clang 16 (authored by arichardson).
mandoc: fix bootstrapping on Linux with Clang 16
Dec 12 2023, 5:16 AM
arichardson closed D43000: jevents: fix bootstrapping on Linux with Clang 16.
Dec 12 2023, 5:15 AM
arichardson closed D42999: mandoc: fix bootstrapping on Linux with Clang 16.
Dec 12 2023, 5:15 AM

Dec 11 2023

arichardson requested review of D43000: jevents: fix bootstrapping on Linux with Clang 16.
Dec 11 2023, 11:00 PM