Skip to content

Commit

Permalink
Address objtool check failures in lua module
Browse files Browse the repository at this point in the history
The use of void __attribute__((noreturn)) in kernel builds
was causing lots of warnings if CONFIG_STACK_VALIDATION
is active. For now we just remove this attribute to achieve
clean builds for the Lua module. There was no significant
increase in the time to run the full channel_program ZTS tests.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Don Brady <don.brady@delphix.com>
Closes #7173
  • Loading branch information
don-brady authored and behlendorf committed Feb 15, 2018
1 parent ec7c1b9 commit 62d5c55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion module/lua/llimits.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ typedef LUAI_UACNUMBER l_uacNumber;

/*
** non-return type
**
** Supress noreturn attribute in kernel builds to avoid objtool check warnings
*/
#if defined(__GNUC__)
#if defined(__GNUC__) && !defined(_KERNEL)
#define l_noret void __attribute__((noreturn))
#elif defined(_MSC_VER)
#define l_noret void __declspec(noreturn)
Expand Down

0 comments on commit 62d5c55

Please sign in to comment.