STINNER Victor <victor.stin...@gmail.com> added the comment:

faulthandler has arbitrary limits to avoid an unlimited loop if some
data are corrupted.

#define MAX_STRING_LENGTH 100
#define MAX_FRAME_DEPTH 100
#define MAX_NTHREADS 100

The string limit is maybe too short. MAX_STRING_LENGTH can be set to
500 characters, what do you think?

We may also add a function to change these limits at runtime.

> Without investigating further, my instinct would be to prefer to truncate in 
> the middle,
> if possible, otherwise truncate the head of the path, rather than truncate 
> the tail.

faulthandler does not trust anything, including the length of the
string. Change the limit to 500 characters should be safer.

Remember that faulthandler is called when something really bad
happens, like a segfault or an illegal instruction.

faulthandler may be less strict when it is called explicitly, ex:
faulthandler.dump_traceback().

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15463>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to