Skip to content

Fixes for LPC55S69_NS TLS tests #12178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 3, 2020
Merged

Conversation

tymoteuszblochmobica
Copy link
Contributor

Fixed ESP8266 nullpointer dereference.
Incerased LPC55S69_NS heap in IAR linker script for TLS purpose.
Summary of changes

Issue for IAR echotest and echotest nonblock with calloc fail.
Problem solved after increasing heap for IAR linker script LPC55S69_cm33_core0_flash.icf

TLSSOCKET_CONNECT_INVALID fail caused by null pointer dereference in ESP8266.

ESP8266 tcp_open called with uninitialized socket IP adress and port - this is purpose of test
Then ATCmdParser calls on vsprintf with null.
This change returns with NSAPI_ERROR_PARAMETER if IP sting is null instead calling ATCmdParser and vsprintf.
Impact of changes
Migration actions required

Not needed.
Documentation

Not needed.
Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@AnttiKauppila
@SeppoTakalo
@michalpasztamobica

@ciarmcom
Copy link
Member

@tymoteuszblochmobica, thank you for your changes.
@maclobdell @ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-maintainers please review.

@ciarmcom ciarmcom requested review from maclobdell and a team December 31, 2019 16:00
@@ -59,7 +59,7 @@ if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
}

define symbol __stack_size__ = MBED_BOOT_STACK_SIZE;
define symbol __heap_size__ = 0x4000;
define symbol __heap_size__ = 0x10000;
Copy link
Contributor

@0xc0170 0xc0170 Jan 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of this one, we should keep as it was and change to dynamic stack

define block HEAP with expanding size, alignment = 8, minimum size = __heap_size__ { };

this should fix it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0xc0170 . Just a side note - shouldn't we migrate all targets to use dynamic heap allocation with IAR? Do you know if anyone is working on this? If not then who could take care of this?
This could help us avoid a lot of issues of this kind.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should, but it's a lot of work :/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarceloSalazar Can we bring this up again to partners to get this update to every target?

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 2, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 2, 2020

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@0xc0170 0xc0170 added the release-version: 6.0.0-alpha-1 First pre-release version of 6.0.0 label Jan 3, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Jan 3, 2020

Restarted Travis, should be ready for merge soon

@0xc0170 0xc0170 removed the needs: CI label Jan 3, 2020
@0xc0170 0xc0170 merged commit 4feca59 into ARMmbed:master Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-version: 6.0.0-alpha-1 First pre-release version of 6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants