Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 03 Feb 2020 11:42:30 +0000
From: Mark Corbin <>
Subject: REG_SP Definition for RISC-V


I'm trying to fix a build issue with libsigsegv [1] for RISC-V when compiling 
against musl 1.1.24 (under Buildroot).

The build fails because the array index 'REG_SP' (for indexing into 
uc_mcontext.__gregs[]) is not defined in arch/riscv64/bits/signal.h. This 
constant is defined by glibc in sysdeps/unix/sysv/linux/riscv/sys/ucontext.h

I was wondering whether the appropriate fix is just to add '#define REG_SP 2' to 
the top of arch/riscv64/bits/signal.h ? (Note that there is a REG_SP definition 
in arch/riscv64/bits/reg.h which isn't being included).

Alternatively I could submit a patch to libsigsegv to modify the index into 
the '__gregs' array to be '2' rather than 'REG_SP', however there could be 
other glibc compatible RISC-V packages that make use of the 'REG_SP' 

I'm happy to generate and submit any patches as appropriate.


Mark Corbin


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.