Commit Graph

14 Commits

Author SHA1 Message Date
Denis Vlasenko
42e4af3119 make leak test more robust by unsetting all vars 2009-04-26 23:25:36 +00:00
Denis Vlasenko
572930027d hush: nommu fix for function passing 2009-04-26 20:06:14 +00:00
Denis Vlasenko
dcd78c4d0f hush: fix "export not_yet_defined_var", fix parsing of "cmd | }"
corner case; improve hush_leaktool.sh;
 fix some false positives in testsuite

function                                             old     new   delta
builtin_export                                       191     206     +15
parse_stream                                        2196    2200      +4
2009-04-19 23:07:51 +00:00
Denis Vlasenko
ed055214bb hush: fix "while...do f1() {a;}; f1; f1 {b;}; f1; done" bug 2009-04-11 10:37:10 +00:00
Denis Vlasenko
75bccfa375 hush: tweak tests 2009-04-10 23:48:03 +00:00
Denis Vlasenko
ce4acbbab6 hush: add function tests 2009-04-10 23:23:41 +00:00
Denis Vlasenko
1943aec2ec hush: plug the leak of expanded heredoc 2009-04-09 14:15:57 +00:00
Denis Vlasenko
5c090a96f9 hush: more rodust detection of unterminated strings etc;
fix a case where we forget to copy `cmd` text;
 optimize nommu heredoc helper by not passing environment to it;
 add several tests

function                                             old     new   delta
add_till_closing_paren                               256     308     +52
parse_stream                                        2337    2378     +41
add_till_backquote                                    82     111     +29
re_execute_shell                                     269     284     +15
handle_dollar                                        802     812     +10
parse_stream_dquoted                                 316     320      +4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/0 up/down: 151/0)             Total: 151 bytes
2009-04-08 21:51:33 +00:00
Denis Vlasenko
ffe6f80851 expand leak_all1.tests 2009-04-08 16:59:24 +00:00
Denis Vlasenko
08daf564ae hush: add a leak test which currently fails 2009-04-08 12:11:23 +00:00
Denis Vlasenko
c73b70c701 hush: add leak detector helper; fix/add tests for it
function                                             old     new   delta
builtin_memleak                                        -      92     +92
bltins                                               288     300     +12
2009-04-08 11:48:57 +00:00
Denis Vlasenko
afd7a8d744 hush: fix environment and memory leaks, add tests for them
function                                             old     new   delta
add_malloced_string_to_strings                         -     110    +110
run_list                                            1999    2086     +87
free_strings_and_unsetenv                              -      87     +87
hush_version_str                                       -      18     +18
pseudo_exec_argv                                     139     146      +7
static.version_str                                    17       -     -17
free_pipe                                            237     210     -27
done_word                                            790     642    -148
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 2/2 up/down: 309/-192)          Total: 117 bytes
2008-10-09 16:29:44 +00:00
Denis Vlasenko
f962a0354e hush: plug memory leak 2007-11-23 12:50:54 +00:00
Denis Vlasenko
d76c049cc4 hush: rework variable storage and environment handling.
More that -100 bytes of code + memory leak plugged.
Added a testcase for it.
2007-05-25 02:16:25 +00:00