What does this error mean: `somefile.c:200: error: the frame size of 1032 bytes is larger than 1024 bytes`?

后端 未结 3 1582
时光说笑
时光说笑 2021-02-02 09:21

During a make, I\'m seeing an error along the lines of:

cc1: warnings being treated as errors
somefile.c:200: error: the frame size of 1032 bytes is larger than         


        
3条回答
  •  北荒
    北荒 (楼主)
    2021-02-02 09:42

    I'm guessing there's some large buffer in that routine that is stack-allocated; this is likely causing the stack frame of that function to exceed 1024 bytes, which seems to be some compiler-enforced limit for the architecture upon which you are building. Possible solutions would include passing a compiler flag to relax the warning, expand the upper limit of the stack size, or dynamically allocating the buffer.

提交回复
热议问题