Ticket #45872

S3_0 luasql clang analyzer warnings

Open Date: 2022-10-15 19:24 Last Update: 2022-10-28 12:38

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
1

Details

Clang analyzer gives some NULL dereference warnings about luasql code in S3_0. That does not happen with later branches. I don't know what makes the difference - we have newer version of luasql in S3_1 & master, but the changes don't seem relevant.

It's easy enough to silence those warnings by checking against NULL pointer in the very spots the warnings are given about, but if there's real problem (i.e. if NULL pointers can really make it there) that would only mean that the crash would happen a bit later where the very same pointer would be dereferenced again, even though analyzers heuristics don't catch that.

Ticket History (3/6 Histories)

2022-10-15 19:24 Updated by: cazfi
  • New Ticket "S3_0 luasql clang analyzer warnings" created
2022-10-15 19:25 Updated by: cazfi
  • Details Updated
2022-10-25 12:17 Updated by: cazfi
Comment

Reply To cazfi

in S3_0. That does not happen with later branches. I don't know what makes the difference

The difference comes from lua5.3 vs lua5.4 headers. The way macros are defined in the latter make it clear to the analyzer that there's no problem.

2022-10-26 03:25 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
Comment

Patch meant for S3_0 only (not to later branches)

2022-10-28 12:38 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

Please login to add comment to this ticket » Login