buffer overflow check bug
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 20120618113037.GI4400@mwanda
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 20120618121726.GG13539@mwanda
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 20120618134338.GJ4400@mwanda
A message that is not in the archive (sent off-list or not yet received): 20120618181111.GH13539@mwanda
A message that is not in the archive (sent off-list or not yet received): CAHGf_=rNSUKPrV5yYyJ8KWbvHO4zAPU7Du4_9HbwW-HiLVbFiw@mail.gmail.com
Gar... I have no idea. That seems like an issue in sparse.
Does anyone know why MOD_NORETURN gets set for:
extern void my_exit(const char*, ...) __attribute__ ((__noreturn__));
but not for:
extern __attribute__ ((__noreturn__)) void my_exit(const char*, ...);
GCC seems to accept both formats.
regards,
dan carpenter
Quoted 9 lines · Dan Carpenter
Gar... I have no idea. That seems like an issue in sparse.
Does anyone know why
MOD_NORETURNgets set for:
extern voidmy_exit(const char*, ...)__attribute__((__noreturn__));but not for:
extern__attribute__((__noreturn__)) voidmy_exit(const char*, ...);GCC seems to accept both formats.
I wonder if the latter gets incorrectly parsed as though the attribute attached to "void" rather than "my_exit"?
- Josh Triplett
Quoted 6 lines · Josh Triplett
Quoted 5 lines · Dan Carpenter
Gar... I have no idea. That seems like an issue in sparse.
Does anyone know why
MOD_NORETURNgets set for:
extern voidmy_exit(const char*, ...)__attribute__((__noreturn__));
Quoted 8 lines
Quoted 4 lines
but not for:
extern__attribute__((__noreturn__)) voidmy_exit(const char*, ...);GCC seems to accept both formats.
I wonder if the latter gets incorrectly parsed as though the attribute attached to "void" rather than "
my_exit"?
I put a:
printf("%d %d token = %s\n", token->pos.line, token->pos.pos, token->ident->name);in handle_attributes() and it only prints when the attribute is at the end.
regards,
dan carpenter
Quoted 9 lines · Dan Carpenter
Gar... I have no idea. That seems like an issue in sparse.
Does anyone know why
MOD_NORETURNgets set for:
extern voidmy_exit(const char*, ...)__attribute__((__noreturn__));but not for:
extern__attribute__((__noreturn__)) voidmy_exit(const char*, ...);GCC seems to accept both formats.
Which version of sparse are you using? Everything looks good to me here.
extern void my_exit(const char*, ...) __attribute__ ((__noreturn__));
extern __attribute__ ((__noreturn__)) void another_exit(const char*, ...);
void foo(void) { my_exit(""); }
void bar(void) { another_exit(""); }My backend "splay" emits:
declare void @my_exit(i8*, ...) noreturn
declare void @another_exit(i8*, ...) noreturn
...
The noreturn attribute is set simply by:
if (sym->ctype.modifiers & MOD_NORETURN)
LLVMAddFunctionAttr(func, LLVMNoReturnAttribute);- xi
Quoted 7 lines · Xi Wang
Quoted 5 lines · Dan Carpenter
Gar... I have no idea. That seems like an issue in sparse.
Does anyone know why
MOD_NORETURNgets set for:
extern voidmy_exit(const char*, ...)__attribute__((__noreturn__));
Quoted 6 lines
Quoted 4 lines
but not for:
extern__attribute__((__noreturn__)) voidmy_exit(const char*, ...);GCC seems to accept both formats.
Which version of sparse are you using? Everything looks good to me here.
I'm on sparse 0.4.4. Which version are you on?
Quoted 8 lines
extern void my_exit(const char*, ...) __attribute__ ((__noreturn__)); extern __attribute__ ((__noreturn__)) void another_exit(const char*, ...); void foo(void) { my_exit(""); } void bar(void) { another_exit(""); }My backend "splay" emits:
Quoted 8 lines
declare void @my_exit(i8*, ...) noreturn
declare void @another_exit(i8*, ...) noreturn
...The noreturn attribute is set simply by:
if (sym->ctype.modifiers & MOD_NORETURN) LLVMAddFunctionAttr(func, LLVMNoReturnAttribute);
Yep. I use the same test, but sym->ctype.modifiers is not set for me. The debug printf I added in handle_attributes() should have printed.
regards,
dan carpenter