Opened 14 years ago
Closed 14 years ago
#346 closed defect (fixed)
Segfault for iteration specs like ":1000" and "1000"
Reported by: | Christian Speckner | Owned by: | kilian |
---|---|---|---|
Priority: | P3 | Milestone: | v2.0.4 |
Component: | core | Version: | 2.0.2 |
Severity: | minor | Keywords: | |
Cc: |
Description
The syntax rules of SINDARIN allow for iteration specs which omit the iteration count (in which case, I presume, WHIZARD should insert the default). However, doing so makes WHIZARD segfault, the relevant part of the backtrace being
#0 parse_node_get_sub_ptr (node=Cannot access memory at address 0x0 ) at parser.f90:514 #1 0xb7c232c7 in eval_node_compile_expr (en=0x0, pn=Cannot access memory at address 0x0 ) at expressions.f90:2164 #2 0xb7c04446 in eval_tree_init_expr (eval_tree=..., parse_node=Cannot access memory at address 0x0 ) at expressions.f90:5925 #3 0xb7c030d6 in eval_int (parse_node=Cannot access memory at address 0x0 ) at expressions.f90:6265 #4 0xb7df9ccf in cmd_iterations_execute (iterations=..., global=...) at commands.f90:4774 #5 0xb7e3925e in command_execute (command=..., global=...) at commands.f90:928 #6 0xb7df2b9e in command_list_execute (cmd_list=..., global=...) at commands.f90:5544 #7 0xb7e3bf5f in whizard_process_stream (stream=..., lexer=..., quit=.FALSE., quit_code=0) at whizard.f90:278 #8 0xb7e3c5c0 in whizard_process_file (file=..., quit=.FALSE., quit_code=0) at whizard.f90:256 #9 0xb7f71b37 in MAIN__ () at main.f90:301
The simplest solution I guess would be just disabling this feature (the point of which I am not seeing anyway).
Change History (3)
comment:1 Changed 14 years ago by
Summary: | Segfault for iteration specs like ":1000" → Segfault for iteration specs like ":1000" and "1000" |
---|
comment:2 Changed 14 years ago by
Milestone: | v2.0.3 → v2.0.4 |
---|
comment:3 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Making the numbers optional was inherited from W1 where one could write a 0 to indicate the default. I agree that this feature is not really needed. In particular, in W2 one can insert an arithmetic expression, which adds sufficient flexibility.
In the revised syntax r2797, the form x:y is enforced with both x and y mandatory.
The same happens for
iterations = 1000
.