#49618 Fix compiler warnings on arm
Closed: fixed 2 years ago Opened 2 years ago by mreynolds.

Issue Description

Whether we like it or not, we need to support the "arm" platform upstream. There are many issues with int types that are causing a ton of warnings. Its possible we are also seeing crashes due to this (that is still under investigation though).

Attached in a file with all the warnings on 1.4.0.6


Metadata Update from @mreynolds:
- Custom field component adjusted to None
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None
- Custom field type adjusted to None
- Custom field version adjusted to None

2 years ago

Metadata Update from @mreynolds:
- Issue assigned to mreynolds

2 years ago

Fixing some of the warnings in repl5_agmt.c around slapi_ch_smprintf() has fixed a crash, so we should fix these asap.

Had problems updating PR, so I just did it manually

a3d3e1a..5e383c8 master -> master

Metadata Update from @mreynolds:
- Custom field reviewstatus adjusted to ack (was: None)
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

2 years ago

This introduced a crash (regression)

39 @@ -189,10 +189,10 @@
40 unsigned char buffer[SASL_IO_BUFFER_START_SIZE];
41 sasl_io_private sp = sasl_get_io_private(fd);
42 Connection
c = sp->conn;
43 - PRInt32 amount = sizeof(buffer);
44 - PRInt32 ret = 0;
45 - size_t packet_length = 0;
46 - size_t saslio_limit;
47 + uint32_t amount = sizeof(buffer);
48 + uint32_t ret = 0;
49 + uint32_t packet_length = 0;
50 + int32_t saslio_limit;

"ret", and "amount" are supposed to be signed. When an error occurs On PR_Recv() we overflow and do not detect an error then the server tries a crazy allocation. Tracking this via:

https://pagure.io/389-ds-base/issue/49639

with this fix you get compiler warnings that for unsigned types
c_maxentries >= 0 always is true.

I think we no longer correctly handle -1 as unlimited

with this fix you get compiler warnings that for unsigned types
c_maxentries >= 0 always is true.
I think we no longer correctly handle -1 as unlimited

You're correct, although I don't get a compiler warning :-/ I'll add this into my other coverity fix patch that is out for review:

https://pagure.io/389-ds-base/pull-request/49676

Metadata Update from @spichugi:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1627512

11 months ago

60b97ef..a82b02f 389-ds-base-1.3.8 -> 389-ds-base-1.3.8

Login to comment on this ticket.

Metadata
Attachments 1
Attached 2 years ago View Comment