Project

General

Profile

Bug #5145

Invalid assert() in _nscd_get()

Added by Marcel Telka about 5 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
cmd - userland programs
Start date:
2014-09-10
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage

Description

The assert expression at line 190 in _nscd_get() is always false:

186    if ((addr_rwlock = _nscd_is_int_addr(data,
187            access->seq_num)) == NULL) {
188        _NSCD_LOG(NSCD_LOG_ACCESS_INFO, NSCD_LOG_LEVEL_DEBUG)
189        (me, "internal address %p not found\\n", data);
190        assert(addr_rwlock != NULL);
191        return (NULL);
192    }

Found by the source code inspection.

History

#1

Updated by Marcel Telka about 5 years ago

  • Status changed from In Progress to Pending RTI
#2

Updated by Marcel Telka about 5 years ago

  • Status changed from Pending RTI to Resolved

Ha! I looked at this deeper and I found that normally the _nscd_is_int_addr() call in the _nscd_get() cannot return NULL. So the assert() I'm trying to remove seems to be intentionally there.

There is nothing to fix here.

#3

Updated by Gary Mills about 5 years ago

Not quite nothing to fix. The `if' statement still includes only the NULL case. Shouldn't it always assert?

#4

Updated by Gary Mills about 5 years ago

Oops. The assertion will always fail, which is what we want to happen here. There is nothing to fix here.

Also available in: Atom PDF