[FS#3263] struct blob_buf must be static when used as a local otherwise a runtime error occurs

OpenWrt Bugs openwrt-bugs at lists.openwrt.org
Sun Aug 2 07:45:13 EDT 2020


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Chris Martin (stuffa) 

Attached to Project - OpenWrt/LEDE Project
Summary - struct blob_buf must be static when used as a local otherwise a runtime error occurs
Task Type - Bug Report
Category - Other
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Medium
Priority - Very Low
Reported Version - openwrt-19.07
Due in Version - Undecided
Due Date - Undecided
Details - Supply the following if possible:
 - Device problem occurs on:
rPi3B+.  I expect that the problem occurs on other devices.  I just happen to be developing in rPi3B+

 - Software versions of OpenWrt/LEDE release, packages, etc.
Release 19.07 trunc

 - Steps to reproduce

void my_function() {
  struct blob_buf b;   // NOTE this is a local variable
  blob_buf_init(&b, 0);
  blobmsg_add_string(&b, "key", "value");
  blob_buf_free(&b);
}

The above will compile, but will crash when run
However by making the struct static it runs OK.

This looks to be a compiler problem.  possibly only for ARM


   

 

More information can be found at the following URL:
https://bugs.openwrt.org/index.php?do=details&task_id=3263

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the openwrt-bugs mailing list