View Issue Details

IDProjectCategoryView StatusLast Update
0000836LDMud 3.5Runtimepublic2018-01-30 03:59
Reporterzesstra Assigned Tozesstra  
PriorityhighSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSMacOS XOS Version10.9.x
Target Version3.5.0Fixed in Version3.5.0 
Summary0000836: Crash when determining a result type of a struct member lookup operation when struct is unknown.
DescriptionDuring get_struct_member_result_type() struct_find_member() and struct_t_size() may be called with the struct being NULL. This is not handled by the two called functions - however, I am not sure if they should. (Would be more robust, if they do.)
get_struct_member_result_type() should probably detect that and not call them in the first hand.

Preceding the crash is a compile error due to an unknown struct:
secure/errord.c line 1: Unknown struct 'fullissue_s' before ' issue)'.

The crashing code is basically (with no struct fullissue_s defined anywhere):
int db_insert_issue(struct fullissue_s issue)
{
  return issue->id;
}

This is especially unfortunate, because a typo in the struct name will lead to the crash if a struct member is referenced.
Tagsstructs

Activities

zesstra

2014-09-07 22:31

administrator   ~0002239

I have a fix for it in get_struct_member_result_type() and get_lpctype_name_buf(), but maybe there are better ways of handling it. Details tomorrow.

zesstra

2014-09-08 18:05

administrator   ~0002240

Fix committed in revision 604e228d2f2a6afcebb260e75b1c4ef626bbfa61 to master branch (see changeset 966 for details). Thank you for reporting!

zesstra

2018-01-29 18:59

administrator   ~0002313

Fix committed in revision 604e228d2f2a6afcebb260e75b1c4ef626bbfa61 to master branch (see changeset 1427 for details). Thank you for reporting!

zesstra

2018-01-29 21:57

administrator   ~0002364

Fix committed in revision 604e228d2f2a6afcebb260e75b1c4ef626bbfa61 to master branch (see changeset 2755 for details). Thank you for reporting!

zesstra

2018-01-30 03:59

administrator   ~0002415

Fix committed in revision 604e228d2f2a6afcebb260e75b1c4ef626bbfa61 to master branch (see changeset 3840 for details). Thank you for reporting!

Issue History

Date Modified Username Field Change
2014-09-07 20:35 zesstra New Issue
2014-09-07 20:47 zesstra Tag Attached: structs
2014-09-07 22:17 zesstra Status new => confirmed
2014-09-07 22:31 zesstra Note Added: 0002239
2014-09-08 17:53 zesstra Assigned To => zesstra
2014-09-08 17:53 zesstra Status confirmed => assigned
2014-09-08 18:05 zesstra Source_changeset_attached => ldmud.git master 604e228d
2014-09-08 18:05 zesstra Note Added: 0002240
2014-09-08 18:05 zesstra Status assigned => resolved
2014-09-08 18:05 zesstra Resolution open => fixed
2015-01-23 20:37 zesstra Fixed in Version => 3.5.0
2018-01-29 18:59 zesstra Source_changeset_attached => ldmud.git master 604e228d
2018-01-29 18:59 zesstra Note Added: 0002313
2018-01-29 21:57 zesstra Source_changeset_attached => ldmud.git master 604e228d
2018-01-29 21:57 zesstra Note Added: 0002364
2018-01-30 03:59 zesstra Source_changeset_attached => ldmud.git master 604e228d
2018-01-30 03:59 zesstra Note Added: 0002415