Re: execline: Segfault with the define program

From: fff iii <fr3akyidiot_at_gmail.com>
Date: Wed, 5 Apr 2017 11:49:31 -0400

On Wed, Apr 5, 2017 at 4:08 AM, Laurent Bercot <ska-skaware_at_skarnet.org> wrote:
>> define TESTING \#testing
>> define TESTING2 /test1/test2/test3/test4/\\${TESTING}/test6
>
>
> Works for me.
>
> Please make sure you're running the latest version of execline, built
> against the latest version of skalibs. (execline-2.3.0.0 won't work
> with a version of skalibs older than 2.5.0.0.)
>
> If it's still not working for you after rebuilding, please give your
> machine sysdeps (/usr/lib/skalibs/sysdeps/sysdeps).
>
> --
> Laurent


Hi Laurent,


Note there are two '\\' before ${TESTING}
and TESTING is defined as TESTING="#testing" would be in a regular
shell, I had to use a backslash to escape #

Hope the following helps:

If I use just one backslash, it works. If I use two - segfaults. If I
use three backslashes, it also segfaults. If I use four or five
backslashes it works. Segfaults with six backslashes.

Yes, these are the latest skalibs and execline from the git on a
recent OpenBSD-current snapshot:

Here are the sysdeps:

target: amd64-unknown-openbsd6.1
clockrt: yes
clockmon: yes
posixspawn: yes
timer: no
endianness: little
sizeofushort: 2
sizeofuint: 4
sizeofulong: 8
sizeofsize: 8
signedsize: no
sizeofuid: 4
signeduid: no
sizeofgid: 4
signedgid: no
sizeofpid: 4
signedpid: yes
sizeoftime: 8
signedtime: yes
sizeofdev: 4
signeddev: yes
sizeofino: 8
signedino: no
accept4: yes
ancilautoclose: no
cmsgcloexec: yes
devurandom: yes
eproto: no
eventfd: no
flock: yes
getpeereid: yes
sopeercred: no
getpeerucred: no
ipv6: yes
malloc0: yes
msgdontwait: yes
nbwaitall: no
openat: yes
linkat: yes
pipe2: yes
ppoll: yes
revoke: yes
sendfile: no
setgroups: yes
settimeofday: yes
signalfd: no
splice: no
strcasestr: yes
strnlen: yes
uint64t: yes
futimens: yes
futimes: yes
arc4random: yes
arc4random_addrandom: no
getrandom: no
itimer: yes

Thank you.
Received on Wed Apr 05 2017 - 15:49:31 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC