diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2009-11-01 09:25:42 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2009-11-01 09:25:42 -0800 |
commit | 08cebd08c7645737d44de8a801af7c2df7874571 (patch) | |
tree | 78969e3fda526f41a4b846652fccd30b53e14b48 | |
parent | 04ed380c4a389c0c21eae8e3cd35e7e44506a2e3 (diff) | |
download | txr-08cebd08c7645737d44de8a801af7c2df7874571.tar.gz txr-08cebd08c7645737d44de8a801af7c2df7874571.tar.bz2 txr-08cebd08c7645737d44de8a801af7c2df7874571.zip |
Bug ID 27895: Calls to protect have an argument list terminated
by the integer constant 0 rather than a proper null pointer constant.
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | lib.c | 3 | ||||
-rw-r--r-- | stream.c | 2 | ||||
-rw-r--r-- | txr.c | 4 | ||||
-rw-r--r-- | unwind.c | 2 |
5 files changed, 19 insertions, 5 deletions
@@ -1,5 +1,18 @@ 2009-11-01 Kaz Kylheku <kkylheku@gmail.com> + Bug ID 27895: Calls to protect have an argument list terminated + by the integer constant 0 rather than a proper null pointer constant. + + lib.c (obj_init): Properly terminate argument list of protect call. + + stream.c (stream_init): Likewise. + + unwind.c (unwind_init): Likewise. + + txr.c (txr_main): two-argument protect calls rewritten using prot1. + +2009-11-01 Kaz Kylheku <kkylheku@gmail.com> + Bug ID 27899: Garbage collection problem: method of locating stack bottom is unreliable due to the unpredictable allocation order of local variables. The addresses of stack_bottom_0 and stack_bottom_1 variables @@ -1681,7 +1681,8 @@ static void obj_init(void) &two, &negone, &maxint, &minint, &null_string, &nil_string, &null_list, &equal_f, - &identity_f, &prog_string, 0); + &identity_f, &prog_string, + (obj_t **) 0); nil_string = string("nil"); @@ -634,7 +634,7 @@ obj_t *put_line(obj_t *stream, obj_t *string) void stream_init(void) { - protect(&std_input, &std_output, &std_error, 0); + protect(&std_input, &std_output, &std_error, (obj_t **) 0); std_input = make_stdio_stream(stdin, t, nil); std_output = make_stdio_stream(stdout, nil, t); std_error = make_stdio_stream(stderr, nil, t); @@ -151,10 +151,10 @@ static int txr_main(int argc, char **argv) int match_loglevel = opt_loglevel; progname = argv[0] ? argv[0] : progname; - protect(&spec_file_str, 0); + prot1(&spec_file_str); yyin_stream = std_input; - protect(&yyin_stream, 0); + prot1(&yyin_stream); if (argc <= 1) { hint(); @@ -361,7 +361,7 @@ void uw_continue(uw_frame_t *current, uw_frame_t *cont) void uw_init(void) { - protect(&toplevel_env.ev.func_bindings, &exception_subtypes, 0); + protect(&toplevel_env.ev.func_bindings, &exception_subtypes, (obj_t **) 0); exception_subtypes = cons(cons(t, nil), exception_subtypes); uw_register_subtype(type_error, error); uw_register_subtype(internal_err, error); |