Menu

#1036 SEGFAULT on Huge Line Number

v1.23.1
open
Segfault (2)
v1.23.1
6
2014-04-13
2014-04-13
lardoux
No

Yep,

I found a segfault in your last release of Geany (1.23.1). When I writed over 1 800 000 000 lines, Geany was K.O ... I haven't the real number (copy -> paste -> "boum"), but it's probably an INT size (2 147 483 647).

bye,

Discussion

  • Lex Trotman

    Lex Trotman - 2014-04-13

    Yes, line numbers are limited to maximum signed int, usually 2^31-1 on 32 bit systems.

    Taking a line from the C language spec, what happens when you reach that limit is "undefined".

    But it is also possible that you have reached a memory limit if on a 32 bit system.

     
  • Anonymous

    Anonymous - 2014-04-13

    Not just line numbers even buffer size and offsets, Scintilla uses int all over the place where it should use more appropriate types (eg. long, unsigned long, size_t, intptr_t, ptrdiff_t, etc)

     

Log in to post a comment.