* error: ctype on uninitialized symbol
@ 2016-02-01 19:44 Bob Copeland
2016-02-02 2:53 ` Bob Copeland
0 siblings, 1 reply; 2+ messages in thread
From: Bob Copeland @ 2016-02-01 19:44 UTC (permalink / raw)
To: linux-sparse
Hi all,
I'm seeing the following error when running sparse with latest HEAD,
against the small test case at the end:
$ sparse sparse-test.c
[garbage]:0:0: error: ctype on uninitialized symbol 0x696ec0
I am getting this with calls to time_after(..., msecs_to_jiffies()) in my
kernel build.
Below, the "1UL + 1L" is a stand-in for MAX_JIFFY_OFFSET, and the value
has to be some operation on two different types to trigger for me (e.g.
1UL + 1UL will run without error). Taking out the typecheck macro will
also remove the error.
Any thoughts?
$ sparse --version
v0.5.0-44-g40791b9
sparse-test.c:
#define typecheck(type,x) \
({ type __dummy; \
typeof(x) __dummy2; \
(void)(&__dummy == &__dummy2); \
1; \
})
#define time_after(a,b) \
(typecheck(unsigned long, a) && \
typecheck(unsigned long, b) && \
((long)((b) - (a)) < 0))
static inline unsigned long y(void)
{
return 1UL+1L;
}
static void x(void)
{
int c = time_after(1UL, y());
}
--
Bob Copeland %% http://bobcopeland.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: error: ctype on uninitialized symbol
2016-02-01 19:44 error: ctype on uninitialized symbol Bob Copeland
@ 2016-02-02 2:53 ` Bob Copeland
0 siblings, 0 replies; 2+ messages in thread
From: Bob Copeland @ 2016-02-02 2:53 UTC (permalink / raw)
To: linux-sparse
On Mon, Feb 01, 2016 at 02:44:09PM -0500, Bob Copeland wrote:
> Hi all,
>
> I'm seeing the following error when running sparse with latest HEAD,
> against the small test case at the end:
>
> $ sparse sparse-test.c
> [garbage]:0:0: error: ctype on uninitialized symbol 0x696ec0
Nevermind, I fooled myself. Turns out this "sparse" was an old version
of smatch, not the freshly-built sparse that "sparse --version" was
reporting.
It looks like this bug was fixed around 0.4.4.
Sorry for the noise!
--
Bob Copeland %% http://bobcopeland.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-02 2:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-01 19:44 error: ctype on uninitialized symbol Bob Copeland
2016-02-02 2:53 ` Bob Copeland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).