seg fault on startup with old state file
My tor client on debian squeeze seg faults on startup: ``` #0 0x0000000000440eef in rep_hist_load_bwhist_state_section (b=0x7b9a90, s_values=0x0, s_maxima=0x7bdcb0, s_begins=1157593157, s_interval=900) at src/or/rephist.c:1678 #1 0x0000000000441382 in rep_hist_load_state (state=0x7c1240, err=0x7fffffffe180) at src/or/rephist.c:1758 #2 0x00000000004ac81e in or_state_set (new_state=0x7c1240) at src/or/config.c:6872 #3 0x00000000004acd45 in or_state_load () at src/or/config.c:6988 #4 0x000000000049d87d in options_act (old_options=0x0) at src/or/config.c:1458 #5 0x000000000049c089 in set_options (new_val=0x7bbb10, msg=0x7fffffffe3e0) at src/or/config.c:763 #6 0x00000000004a7570 in options_init_from_string (cf_defaults=0x7bb0f0 "", cf=0x7bb1a0 "", command=0, command_arg=0x0, msg=0x7fffffffe3e0) at src/or/config.c:4838 #7 0x00000000004a6f3e in options_init_from_torrc (argc=1, argv=0x7fffffffe6b8) at src/or/config.c:4695 #8 0x000000000040de73 in tor_init (argc=1, argv=0x7fffffffe6b8) at src/or/main.c:2342 #9 0x000000000040e523 in tor_main (argc=1, argv=0x7fffffffe6b8) at src/or/main.c:2655 #10 0x0000000000408b04 in main (argc=1, argv=0x7fffffffe6b8) at src/or/tor_main.c:30 ``` This is the issue: ``` 0x0000000000440eef in rep_hist_load_bwhist_state_section (b=0x7b9a90, s_values=0x0, s_maxima=0x7bdcb0, s_begins=1157593157, s_interval=900) at src/or/rephist.c:1678 1678 int have_maxima = (smartlist_len(s_values) == smartlist_len(s_maxima)); ``` My state file is from 2006: ``` # Tor state file last generated on 2006-09-06 21:24:22 # You *do not* need to edit this file. # How many bytes have we read in this accounting period? AccountingBytesReadInInterval 0 # How many bytes have we written in this accounting period? AccountingBytesWrittenInInterval 0 # How many bytes did we expect to use per minute? (0 for no estimate.) AccountingExpectedUsage 0 # How long have we been awake in this period? AccountingSecondsActive 0 EntryGuard carini 53A31DB04A3312B167269733CC0AB5454768FC8C # When does the last-recorded read-interval end? BWHistoryReadEnds 2006-09-07 01:39:17 # How long is each read-interval (in seconds)? BWHistoryReadInterval 900 # Number of bytes read in each interval. BWHistoryReadValues # When does the last-recorded write-interval end? BWHistoryWriteEnds 2006-09-07 01:39:17 # How long is each write-interval (in seconds)? BWHistoryWriteInterval 900 # Number of bytes written in each interval. BWHistoryWriteValues # Which version of Tor generated this state file? TorVersion Tor 0.1.2.1-alpha-dev # When was this state file last regenerated? LastWritten 2006-09-07 01:24:22 ```
issue