[Bug 1264546] Review Request: soletta - A framework for making IoT devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1264546



--- Comment #41 from Gustavo Lima Chaves <gustavo.lima.chaves@xxxxxxxxx> ---
> In function '__fread_alias',
>     inlined from 'sol_memmap_write_raw_do.isra.2' at ./src/lib/io/sol-memmap-storage.c:169:15:
> /usr/include/bits/stdio2.h:290:9: warning: call to '__fread_chk_warn' declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer
>   return __fread_chk (__ptr, __bos0 (__ptr), __size, __n, __stream);
>
> It is caused by the fread in this code:
>     if (mask) {
>         uint64_t value = 0, old_value;
>         uint32_t i, j;
>
>         for (i = 0, j = 0; i < entry->size; i++, j += 8)
>             value |= (uint64_t)((uint8_t *)buffer->data)[i] << j;
>
>         ret = fread(&old_value, entry->size, 1, file);
>
> It looks suspicious. Shouldn't old_value be declared
> as size_t, and instead of entry->size, write sizeof(old_value)
> or sizeof(size_t) ? If the size is guaranteed to fit, it will
> have issues in big endian architectures.

I took a closer look and we're out of ideas on how to make gcc to shut up
there. The assert() there was put in by the respective dev to make sure we got
that space (we're under an if clause that guarantees that). I'll leave that as
is for now.

> ---%<---
> Another issue I noticed, is that %install appears to redo all
> compilations, after regenerating header files. Some issue with
> make rules?

This one will be my next pursuit, ok?

>  Gustavo, please follow Michael advice, and add
> Provides:	bundled(duktape) = 1.2.2
> duktape-static should be provided by a duktape package,
> that would probably consist of two files, named:
> %{_includedir}/duktape/duktape.{c,h}
> plus license and any doc files, and can be a very
> simple, next package for you :)
> Then, later you can make soletta "BuildRequires: duktape-static"

Ok, I did like he advised, thanks. I can talk to duktape folks later,
sure.

All other review points were already adressed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review




[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]