#1404 closed defect (fixed)
segfault in syntax check
| Reported by: | Jorge | Owned by: | Víctor de Buen Remiro |
|---|---|---|---|
| Priority: | high | Milestone: | Mantainance |
| Component: | Kernel | Version: | head |
| Severity: | major | Keywords: | |
| Cc: |
Description
Sometimes a segmentation fault is generated when syntax check is apply in tolbase.
It is a bug difficult to reproduce.
Change History (10)
comment:1 Changed 14 years ago by
| Status: | new → accepted |
|---|
comment:2 Changed 14 years ago by
comment:3 Changed 14 years ago by
| Owner: | changed from Jorge to Víctor de Buen Remiro |
|---|---|
| Status: | accepted → assigned |
void BSourcePath::AddEmbed(const BText& txt)
should emit an Error if current_==NULL
comment:5 Changed 14 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
comment:7 Changed 14 years ago by
comment:8 Changed 14 years ago by
comment:9 Changed 14 years ago by
comment:10 Changed 14 years ago by
Note: See
TracTickets for help on using
tickets.

The bug is related to this piece of code found in
setgrainc.cpp//-------------------------------------------------------------------- void BSourcePath::AddEmbed(const BText& txt) //-------------------------------------------------------------------- { assert(current_); ((BSourcePath*)current_)->embeded_.Add(txt); }when the syntax check is performed current_ is null because the parser is started on a buffer and not a file.
In order to reproduce this error outside tolbase do:
Text check = ParseError( "#Embed \"aux.tol\";" );