#49618 Fix compiler warnings on arm
Closed: wontfix 4 years ago Opened 4 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

4 years ago

Metadata Update from @mreynolds:
- Issue assigned to mreynolds

4 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)

4 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

3 years ago

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

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/2677

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: fixed)

2 years ago

Login to comment on this ticket.

Metadata
Attachments 1
Attached 4 years ago View Comment