Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bus error on ARM CPUs (i.MX6) with GCC 12.3.0 #1159

Open
ChHapp opened this issue Apr 17, 2024 · 0 comments
Open

bus error on ARM CPUs (i.MX6) with GCC 12.3.0 #1159

ChHapp opened this issue Apr 17, 2024 · 0 comments

Comments

@ChHapp
Copy link

ChHapp commented Apr 17, 2024

I have experienced a 'bus-error' with Yocto-Mickledore (gcc 12.3.0)
I am using the brotli lib with nodejs and when I run a simple compress/decompress example I get this 'bus-error'.

This is a generated example:

const zlib = require('zlib');
const inputString = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
const buffer = Buffer.from(inputString, 'utf-8');

// Compress the buffer using Brotli
zlib.brotliCompress(buffer, (err, compressedBuffer) => {
  if (err) {
    console.error('Error compressing data:', err);
    return;
  }
  
  // Convert compressed buffer to string
  const compressedString = compressedBuffer.toString('base64');  
  console.log('Compressed string:', compressedString);  
  // Decompress the compressed buffer to verify
  zlib.brotliDecompress(compressedBuffer, (err, decompressedBuffer) => {
    if (err) {
      console.error('Error decompressing data:', err);
      return;
    }    
    // Convert decompressed buffer back to string
    const decompressedString = decompressedBuffer.toString('utf-8');    
    console.log('Decompressed string:', decompressedString);
  });
});

I have figured out that if I add a bbappend with CFLAGS += " -Og" the 'libbrotlienc.so.1.0.9' works like a charm again.
Alternatively if I compile it with the GCC 11.2.0 (Yocto-Honister) it also works as expected.

I have also tried newer TAGs and the Git HEAD too, with no luck to getting it to work by using '-O2' as a C flag.

Are there any recommended C flags for this project? Yocto is uses '-O2' by default.
Is this a already known?

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

No branches or pull requests

1 participant