[Ur] getenv segfaults when called from task initialize

Sergey Mironov grrwlf at gmail.com
Tue Mar 4 04:20:43 EST 2014


Hi. The following simple program ends with SIGSEGV:

task initialize = fn _ =>
  v <- getenv (blessEnvVar "USER");
  return {}

I've checked against this version of the urweb

o  changeset:   1991:7db8356caef5
|  user:        Adam Chlipala <adam at chlipala.net>
|  date:        Thu Feb 20 15:50:33 2014 -0500
|  summary:     Tweaked parameter renaming for functors, so now demos
and the original bug-triggering application work

The call stack is

(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00000000004099c2 in uw_initializer (ctx=0x61e030) at /tmp/webapp.c:2190
#2  0x00007ffff79ce626 in uw_initialize (ctx=ctx at entry=0x61e030) at urweb.c:3511
#3  0x00007ffff79d06b4 in uw_request_init (app=app at entry=0x61d800
<uw_application>, ls=ls at entry=0x7ffff7ddc580 <ls>) at request.c:184
#4  0x00007ffff7bdabd9 in main (argc=<optimized out>,
argv=0x7fffffff7bb8) at http.c:377
#5  0x00007ffff637f81d in __libc_start_main () from
/nix/store/q784x64hp3nwdxx7lbgb16f74i2bhxxk-glibc-2.18/lib/libc.so.6
#6  0x00000000004044d9 in _start ()

Please, check!

Regards,
Sergey



More information about the Ur mailing list