]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
FreeBSD syscall: mostly cosmetic update to the unused sbrk syscall
authorPaul Floyd <pjfloyd@wanadoo.fr>
Mon, 10 Jun 2024 05:24:47 +0000 (07:24 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Mon, 10 Jun 2024 05:25:42 +0000 (07:25 +0200)
coregrind/m_syswrap/syswrap-freebsd.c

index 730e1de3f08cea036a6450455c464857adc79ad6..a5d0cc7c69e4bdd15f92f992097b06a5d390a645 100644 (file)
@@ -1255,11 +1255,18 @@ PRE(sys_vfork)
 }
 
 // SYS_sbrk 69
-// void * sbrk(intptr_t incr);
+// int sbrk(int incr);
 PRE(sys_sbrk)
 {
    PRINT("sys_sbrk ( %#" FMT_REGWORD "x )",ARG1);
-   PRE_REG_READ1(void*, "sbrk", vki_intptr_t, incr);
+   PRE_REG_READ1(int, "sbrk", int, incr);
+
+   // removed in FreeBSD 15
+   // prior to that it just returned EOPNOTSUPP
+   // with a comment "Not yet implemented"
+
+   // libc sbrk doesn't call this, it calls __sys_break
+   // which maps to sys_brk
 }
 
 // SYS_freebsd11_vadvise   72