Page MenuHomePhabricator

Printing frequent string literals can cause a crash
Open, LowPublic

Description

Frequent string literal(i.e.: "\r\n") might used several place in a code and compiler might make an optimisation to place it only one instance in the binary. But this location might be not allowed to be available by all code which tries to access it. It can cause a MemManage fault.

You can see an example(and a quick fix) here:
https://review.trustedfirmware.org/#/c/287/3/test/framework/test_framework.c

Originally the "\r\n" was placed in the TF_M core's RO section, which was not available from the test service.

Event Timeline

tamasban triaged this task as Low priority.Oct 25 2018, 12:06 PM
tamasban created this task.