Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

[BUG] GCCでビルドしたときにOTA_PAL.c に不正動作がある #94

Open
HirokiIshiguro opened this issue Dec 21, 2021 · 1 comment

Comments

@HirokiIshiguro
Copy link
Collaborator

HirokiIshiguro commented Dec 21, 2021

Describe the bug

System information

  • Hardware board: [ any ]
  • IDE used: [ e2 studio ]
  • Operating System: [ Windows ]
  • Code version: (202107.00 or older)
  • Project/Demo: [ ota_demo ]
  • If your project is a custom application, please add the relevant code snippet(s) in the section titled "Code to reproduce bug".
    • none

Expected behavior

  • 正常動作

Screenshots or console output

  • none

Steps to reproduce bug

  • OTA動作込みのIDTを動作させる

Code to reproduce bug

  • IDTでシステム動作させる

Additional context

  • none
@HirokiIshiguro
Copy link
Collaborator Author

HirokiIshiguro commented Dec 21, 2021

暫定対策

  • -fno-delete-null-pointer-checks を有効にする

恒久対策

            while( 1 )
            {
                if( ( new->content.offset < current->content.offset ) || ( current == NULL ) )
                {
                    break;
                }
  • 変更後
            while( 1 )
            {
                if( current == NULL )
                {
                    if( new->content.offset < current->content.offset )
                    {
                        break;
                    }
                }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant