[M3devel] fault reports beyond 100mill lines?

Jay K jay.krell at cornell.edu
Tue Jul 6 22:21:08 CEST 2010


It appears that if a file has over around 100 million lines, that fault reports (nil deref, subrange out of bounds, etc.) get the wrong line number.
Leave it as ("qualit of implementation"?) or fail an assertion in the compiler earlier (leaving anyone with a huge file kind of stuck (generated?) or, unlikely, expand the range?
The line number is in an integer along with a 5 bit fault code.
  We could also allow much larger numbers on 64bit targets.


This is just because there's a "FIXME" comment in parse.c.
The code is basically right and I'm adding comments and perhaps assertions.
Certainly we can assert that the fault code is in range.


I think I prefer silently losing bits in the line number, or conveting it to 0 if it is out of bounds or pinning it to maxint.
  Though it'd be maxint  / 32 which is less "special" looking if someone ever saw it.. though the runtime could
  report maxint / 32 as maxint.

 - Jay

 		 	   		  


More information about the M3devel mailing list