emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem report #13 FALSE


From: Andreas Schwab
Subject: Re: Problem report #13 FALSE
Date: Thu, 11 May 2006 11:30:34 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Kenichi Handa <address@hidden> writes:

> Dan Nicolaescu <address@hidden> writes:
>
>> CID: 13
>> Checker: FORWARD_NULL (help)
>> File: emacs/src/coding.c
>> Function: encode_coding_string
>> Description: Variable "(coding)->cmp_data" tracked as NULL was passed to a 
>> function that dereferences it.
>
> I see no bug here.   A member of (coding)->cmp_data is
> accessed only after checking (coding)->cmp_data is not NULL.
>
>> Event var_compare_op: Added "(coding)->cmp_data" due to comparison 
>> "(coding)->cmp_data == 0"
>> Also see events: [var_deref_model]
>> At conditional (1): "(coding)->cmp_data == 0" taking true path
>
>> 6435           if (coding->type != coding_type_ccl
>> 6436               && (! coding->cmp_data || coding->cmp_data->used == 0))
>> 6437             {
>
> Does the checker require it to be writen as below?
>
>> 6436               && (coding->cmp_data ? coding->cmp_data->used == 0 : 1))

That would be stupid, since it would be a major obfucation.  But that's
not the point of the report, the derefence is supposed to happen in
encode_coding.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]