Skip to content

Instantly share code, notes, and snippets.

@scriptum
Created April 9, 2014 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scriptum/10304696 to your computer and use it in GitHub Desktop.
Save scriptum/10304696 to your computer and use it in GitHub Desktop.
12:14 b4n __RPG_: TL;DW (watch), but the start seems to be probably somewhat doable with snippets, wouldn't it?
12:15 b4n the numbered list stuff not, but hum
12:15 b4n ah no wait, length of the -- counts, nevermind
12:15 b4n __RPG_: BTW, about your report on geanylatex, I'm afraid I can't reproduce, which means I can't see what part is problematic
12:16 b4n __RPG_: have you a "steps to reproduce"?
12:16 b4n (or could you reproduce under GDB and print everything relevant)
12:18 Pierre has quit IRC
12:19 elextr feels weird typing std::strlen()
12:19 elextr shivvers all over
12:20 Pierre has joined #geany
12:22 b4n elextr: why are you using strlen()? strlen() is C, just use the C++ way, std::string("foo").length() or whatever ;)
12:22 elextr argv sadly :)
12:22 b4n well, still :)
12:23 b4n std::string(argv[i]).length() -- the strlen() of the poor (or rich) ;)
12:23 elextr std::strlen() is shorter and faster and doesn't copy the string (premature optimisations in full flow :)
12:24 b4n if you wanted fatser code, you would have had wrote C anyway, wouldn't you :) :D
12:24 b4n </troll>
12:24 elextr sure, and be finished in the year 2999 :)
12:25 b4n haha :D
12:26 elextr the amount of effort I save just throwing when everything falls in a heap instead of trying to pass back a gazillion error codes could write the app several times over :)
12:27 hyperair has joined #geany
12:29 elextr exceptions == computer scientist approved gotos with attached message :)
12:30 __RPG_ b4n: I can't reproduce too (it crashes at exit sometimes) but this report is from abrt which almost same as gdb
12:30 b4n __RPG_: well somewhat, but I don't know what caused teh actual error
12:31 b4n remember, I don't read ASM
12:31 b4n I don't know which part is invalid (assumed it's indeed one of the dereference that is invalid)
12:31 b4n editor? ediotr->document? editor->document->file_type?
12:36 __RPG_ b4n: none of them are tested against NULL (editor is in function args and it is ok) :)
12:37 b4n I know, but in normal operation they don't need to
12:37 b4n so I'd like to understand what "impossible" happened
12:37 b4n so to try and find where something went downhill
12:38 elextr its C all impossible pointer values *will* happen :)
12:38 b4n and I doubt they would be NULL, probably rather became invalid like pointer to freed memory
12:40 __RPG_ b4n: all what I can do - assembler mapping to source code
12:40 b4n would be a start maybe
12:41 b4n or try and continuously run geany under gdb and get a BT if you ever see the problem again
12:41 __RPG_ b4n: I hope I can say *which* pointer was wrong but can't say *why*
12:41 b4n sure, why is to be discovered, but that'd be esaier by knowing which pointer was faulty
12:42 __RPG_ b4n: wrong pointer bugs are afraid of debuggers:)
12:43 b4n indeed, but sometimes they still get caught in the act
12:48 __RPG_ tha problem with race condition bugs they are very rare
12:49 b4n yeah…
12:50 __RPG_ b4n: so I found same access pattern, wrong pointer is definitely doc
12:50 b4n ok, so editor is still OK?
12:51 __RPG_ 0x30(%rax) means dereferencing file_type
12:51 __RPG_ yes
12:51 __RPG_ alse take a look
12:51 __RPG_ rax register keeps 0x1 value (not null)
12:51 __RPG_ 0x30 offset is more likely file_type position in document structure
12:52 b4n possible
12:52 SweetGeany [geany/master] b4n - Update NEWS with newer changes (http://tiny.cc/lp0zdx)
12:55 __RPG_ Register rsi 0x6618300 - this is a value of editor pointer (#0 0x00007fc94a2a32d3 in on_editor_notify (object=0x26f6460, editor=0x6618300 ......)
12:55 b4n ah wait, the error is triggered after teh devhelp plugin repacked its thing
12:56 __RPG_ devhelp repacked document?
12:56 b4n yeah, well, the whole document notebook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment