buglwIP - A Lightweight TCP/IP stack - Bugs: bug #61333, Error in preprocessor logic...


You are not allowed to post comments on this tracker with your current authentication level.

bug #61333: Error in preprocessor logic setting ALTCP_MBEDTLS_PLATFORM_ALLOC

Submitted by:  Tom Collins <tomlogic>
Submitted on:  Tue 12 Oct 2021 03:11:18 AM UTC
Category:  apps Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  2.2.0
lwIP version:  * 2.1.1
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:
       No canned response available


Fri 12 Nov 2021 09:31:45 PM UTC, comment #1: 

Fixed, thanks for reporting!

Simon Goldschmidt <goldsimon>
Project Administrator
Tue 12 Oct 2021 03:11:18 AM UTC, original submission:  

I'm using lwIP as part of Silicon Labs's Gecko SDK, and it defines macros for mbedtls_free and mbedtls_calloc, but the compiler then throws an error when code in altcp_tls_mbedtls_mem.c tries to call mbedtls_platform_set_calloc_free().

Current code in altcp_tls_mbedtls_mem.c:


Recommended replacement (added ! before check for calloc macro):


I'm basing this on code seen in platform.h:

#define mbedtls_free       MBEDTLS_PLATFORM_FREE_MACRO
#define mbedtls_calloc     MBEDTLS_PLATFORM_CALLOC_MACRO

Inverting the logic of the second #if should be "!defined || !defined".

Tom Collins <tomlogic>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by tomlogic (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-11-12 goldsimon StatusNone => Fixed
        Assigned toNone => goldsimon
        Open/ClosedOpen => Closed
        Planned ReleaseNone => 2.2.0

    Back to the top

    Powered by Savane 3.9