Skip to content

Commit

Permalink
Update CHANGELOG and cross compilation section of README
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkelfj committed Mar 10, 2024
1 parent cc6e6e5 commit bb2fd58
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@
with explicit id attribute 1. Explict id must leave space for the hidden type
field, but id 1 is valid since id 0 is valid for the type field id. (#271).
- Add C23 support for "pstdbool.h" header.
- Fix strict aliasing UB. In the vast majority of cases `*(T *)p` style
memory access is supported by compilers, but as of this writing, at least
arm-none-eabi with gcc -O2 -mcpu=cortex-m7 will default to an aggressive
optimization that leads to uninitialized stack access when not adding
-fno-strict-aliasing. Other testet targets, incl. m0 and m1, and compilers, do
no exhibit this behaviour at this point time. For more details see
`include/flatcc/portable/pmemaccess.h` and `include/flatcc/flatcc_accessors.h`
(`_read`, `_write`)`. Flatcc never guaranteed strict aliasing but it appears
to be more robust now. Note that the default is still pointer casts on x86/64
to avoid performance hits and because it is not usually a problem.
It should also be noted that observed issue is with a literal buffer array
on local stack. The issue is less likely with dynamically allocated memory. (#274).

## [0.6.1]

Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2333,19 +2333,21 @@ Docker image:
Users have been reporting some degree of success using cross compiles
from Linux x86 host to embedded ARM Linux devices.

For this to work, `FLATCC_TEST` option should be disabled in part
because cross-compilation cannot run the cross-compiled flatcc tool, and
in part because there appears to be some issues with CMake custom build
steps needed when building test and sample projects.

2024-03-08: WARNING:
-O2 -mcpu=cortex-m7 targets using the arm-none-eabi 13.2.Rel1 toolchain
can result in uninitialized stack access when not compiled with
`-fno-strict-aliasing`
-mcpu=cortex-m0 and -mcpu=cortex-m1 appears to be unaffected.
See also [issue #274](https://github.com/dvidelabs/flatcc/issues/274).
2024-10-03: Fix available on flatcc master branch when you read this.
See also CHANGELOG comments for release 0.6.2.


For this to work, `FLATCC_TEST` option should be disabled in part
because cross-compilation cannot run the cross-compiled flatcc tool, and
in part because there appears to be some issues with CMake custom build
steps needed when building test and sample projects.

The option `FLATCC_RTONLY` will disable tests and only build the runtime
library.

Expand Down

0 comments on commit bb2fd58

Please sign in to comment.