Merge "Update sys_ptrace_test.cpp for riscv64."
diff --git a/benchmarks/linker_relocation/include/linker_reloc_bench_asm.h b/benchmarks/linker_relocation/include/linker_reloc_bench_asm.h
index 2ff3d81..885e47f 100644
--- a/benchmarks/linker_relocation/include/linker_reloc_bench_asm.h
+++ b/benchmarks/linker_relocation/include/linker_reloc_bench_asm.h
@@ -42,6 +42,15 @@
 #define DATA_WORD(val) .quad val
 #define MAIN .globl main; main: mov w0, wzr; ret
 
+#elif defined(__riscv)
+
+// No `lga` in clang unless https://reviews.llvm.org/D107278 lands.
+// `la` is equivalent when using PIC (which we do) though.
+#define GOT_RELOC(sym) la a0, sym
+#define CALL(sym) call sym@plt
+#define DATA_WORD(val) .quad val
+#define MAIN .globl main; main: li a0, 0; ret
+
 #elif defined(__i386__)
 
 #define GOT_RELOC(sym) .long sym@got
diff --git a/libc/include/regex.h b/libc/include/regex.h
index 156f9fd..be1418e 100644
--- a/libc/include/regex.h
+++ b/libc/include/regex.h
@@ -49,8 +49,8 @@
 typedef struct {
 	int re_magic;
 	size_t re_nsub;		/* number of parenthesized subexpressions */
-	const char *re_endp;	/* end pointer for REG_PEND */
-	struct re_guts *re_g;	/* none of your business :-) */
+	const char * _Null_unspecified re_endp;	/* end pointer for REG_PEND */
+	struct re_guts * _Null_unspecified re_g;	/* none of your business :-) */
 } regex_t;
 
 typedef struct {
@@ -99,10 +99,10 @@
 #define	REG_BACKR	02000	/* force use of backref code */
 
 __BEGIN_DECLS
-int regcomp(regex_t* __re, const char* __regex, int __flags);
-size_t regerror(int __error_code, const regex_t* __re, char* __buf, size_t __n);
-int regexec(const regex_t* __re, const char* __s, size_t __match_count, regmatch_t __matches[], int __flags);
-void regfree(regex_t* __re);
+int regcomp(regex_t* _Nonnull __re, const char* _Nonnull __regex, int __flags);
+size_t regerror(int __error_code, const regex_t* _Nullable __re, char* _Nullable __buf, size_t __n);
+int regexec(const regex_t* _Nonnull __re, const char* _Nonnull __s, size_t __match_count, regmatch_t __matches[_Nullable], int __flags);
+void regfree(regex_t* _Nonnull __re);
 __END_DECLS
 
 #endif
diff --git a/tests/signal_test.cpp b/tests/signal_test.cpp
index 7f7f3db..fa648d2 100644
--- a/tests/signal_test.cpp
+++ b/tests/signal_test.cpp
@@ -823,9 +823,9 @@
 #endif
 
 TEST(signal, sigset_size) {
-  // The setjmp implementations assume that sigset_t can fit in a
-  // long. This is true because ARM and x86 have broken rt signal support,
-  // and AArch64 and x86_64 both have a SIGRTMAX defined as 64.
+  // The setjmp implementations assume that sigset_t can fit in a long.
+  // This is true because the 32-bit ABIs have broken rt signal support,
+  // but the 64-bit ABIs both have a SIGRTMAX defined as 64.
 #if defined(__BIONIC__)
   static_assert(sizeof(sigset_t) <= sizeof(long), "sigset_t doesn't fit in a long");
 #endif