---------- Forwarded message --------- От: Андрей Рандрианасулу <[email protected]> Date: чт, 24 нояб. 2022 г., 09:33 Subject: unaligned load in bctheme To: randrianasulu <[email protected]> so i tried to instrument cingg to see if she does any unaligned access I added diff --git a/cinelerra-5.1/guicast/Makefile b/cinelerra-5.1/guicast/Makefile index 04d5a2e5..b724c668 100644 --- a/cinelerra-5.1/guicast/Makefile +++ b/cinelerra-5.1/guicast/Makefile @@ -116,6 +116,7 @@ UTILS = $(OBJDIR)/bootstrap $(OBJDIR)/pngtoh $(OBJDIR)/pngto raw BCXFER = xfer/$(OBJDIR)/xfer.stamp CFLAGS += $(static_incs) +CFLAGS += -Wall -fsanitize=alignment $(shell echo $(CFLAGS) > $(OBJDIR)/c_flags) $(shell echo $(OBJS) > $(OBJDIR)/objs) and same -fsanitize=alignment to LDFLAGS env. variable before make. I got this: bash-5.1$ /dev/shm/cinelerra/cinelerra-5.1/bin/cin Cinelerra Infinity - built: Nov 24 2022 08:52:45 git://git.cinelerra-gg.org/goodguy/cinelerra.git (c) 2006-2019 Heroine Virtual Ltd. by Adam Williams 2007-2020 mods for Cinelerra-GG by W.P.Morrow aka goodguy Cinelerra is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. There is absolutely no warranty for Cinelerra. build plugin index for: /dev/shm/cinelerra/cinelerra-5.1/bin/plugins PluginFFilter::new_ffilter(overlay_opencl) err: Input/output error PluginFFilter::new_ffilter(xfade_opencl) err: Input/output error [openclsrc_814 @ 0xb78f400] OpenCL source requires output dimensions to be specified. PluginFFilter::new_ffilter(openclsrc) err: Invalid argument bctheme.C:458:15: runtime error: load of misaligned address 0x098a364d for type 'int', which requires 4 byte alignment 0x098a364d: note: pointer points here 45 47 27 00 48 21 00 00 31 30 38 30 74 6f 34 38 30 2e 70 6e 67 00 00 00 00 00 31 30 38 30 74 6f ^ Total excess of backups: -50 Session time: 0:00:07 Cpu time: user: 0:00:03.699 sys: 0:00:00.480 so patch below fixes this error. Can you please test it on various arches and distros? diff --git a/cinelerra-5.1/guicast/bctheme.C b/cinelerra-5.1/guicast/bctheme.C index 1ec64c7f..9addf9f7 100644 --- a/cinelerra-5.1/guicast/bctheme.C +++ b/cinelerra-5.1/guicast/bctheme.C @@ -455,7 +455,10 @@ void BC_Theme::overlay(VFrame *dst, VFrame *src, int in_x1, int in_x2, int shift void BC_Theme::set_data(unsigned char *ptr) { - int hdr_sz = *(int*)ptr - sizeof(int); + //int hdr_sz = *(int*)ptr - sizeof(int); + int hdr_sz = 0; + memcpy(&hdr_sz, ptr, sizeof(int)); + hdr_sz -= sizeof(int); unsigned char *cp = ptr + sizeof(int); unsigned char *dp = cp + hdr_sz; int start_item = images.size(); lines 7-28/28 (END) -- Андрей Рандрианасулу
ANDREW, Perhaps I duplicated this incorrectly, but when I add after the line CFLAGS += $(static_incs) the line CFLAGS += -Wall -fsanitize=alignment in guicast/Makefile to demonstrate the problem, I just get compiler errors. I also set the environment variable LDFLAGS and when I do echo $LDFLAGS it shows -fsanitize=alignment . Did I make a mistake? Did I miss a step? The only steps I read in your email was: (1) modify guicast/Makefile to add another CFLAGS line (2) set environment variable for LDFLAGS (before LDFLAGS had no value) See below for the end of my log file. /usr/bin/ld:
/tmp/cinelerra-5.1/cinelerra/../guicast/x86_64/libguicast.a(bclistboxitem.o): in function `BC_ListBoxItem::compare_item_text(void const*, void const*)': /tmp/cinelerra-5.1/guicast/bclistboxitem.C:162: undefined reference to `__ubsan_handle_type_mismatch_v1' /usr/bin/ld: /tmp/cinelerra-5.1/guicast/bclistboxitem.C:163: undefined reference to `__ubsan_handle_type_mismatch_v1' /usr/bin/ld: /tmp/cinelerra-5.1/guicast/bclistboxitem.C:163: undefined reference to `__ubsan_handle_type_mismatch_v1' /usr/bin/ld: /tmp/cinelerra-5.1/guicast/bclistboxitem.C:162: undefined reference to `__ubsan_handle_type_mismatch_v1' /usr/bin/ld: /tmp/cinelerra-5.1/cinelerra/../guicast/x86_64/libguicast.a(bclistboxitem.o): in function `ArrayList<BC_ListBoxItem*>::del(BC_ListBoxItem*&)':
/tmp/cinelerra-5.1/guicast/arraylist.h:14: undefined reference to
`__ubsan_handle_type_mismatch_v1' /usr/bin/ld: /tmp/cinelerra-5.1/cinelerra/../guicast/x86_64/libguicast.a(bclistboxitem.o):/tmp/cinelerra-5.1/guicast/arraylist.h:14: more undefined references to `__ubsan_handle_type_mismatch_v1' follow collect2: error: ld returned 1 exit status make[2]: *** [Makefile:607: x86_64/lv2ui] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/tmp/cinelerra-5.1/cinelerra' make[1]: *** [Makefile:582: all-recursive] Error 1 make[1]: Leaving directory '/tmp/cinelerra-5.1'
make: *** [Makefile:529: all] Error 2
On Wed, Nov 23, 2022 at 11:37 PM Andrew Randrianasulu < [email protected]> wrote:
---------- Forwarded message --------- От: Андрей Рандрианасулу <[email protected]> Date: чт, 24 нояб. 2022 г., 09:33 Subject: unaligned load in bctheme To: randrianasulu <[email protected]>
so i tried to instrument cingg to see if she does any unaligned access
I added
diff --git a/cinelerra-5.1/guicast/Makefile b/cinelerra-5.1/guicast/Makefile index 04d5a2e5..b724c668 100644 --- a/cinelerra-5.1/guicast/Makefile +++ b/cinelerra-5.1/guicast/Makefile @@ -116,6 +116,7 @@ UTILS = $(OBJDIR)/bootstrap $(OBJDIR)/pngtoh $(OBJDIR)/pngto raw BCXFER = xfer/$(OBJDIR)/xfer.stamp
CFLAGS += $(static_incs) +CFLAGS += -Wall -fsanitize=alignment
$(shell echo $(CFLAGS) > $(OBJDIR)/c_flags) $(shell echo $(OBJS) > $(OBJDIR)/objs)
and same -fsanitize=alignment to LDFLAGS env. variable before make.
I got this:
bash-5.1$ /dev/shm/cinelerra/cinelerra-5.1/bin/cin Cinelerra Infinity - built: Nov 24 2022 08:52:45 git://git.cinelerra-gg.org/goodguy/cinelerra.git (c) 2006-2019 Heroine Virtual Ltd. by Adam Williams 2007-2020 mods for Cinelerra-GG by W.P.Morrow aka goodguy Cinelerra is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. There is absolutely no warranty for Cinelerra.
build plugin index for: /dev/shm/cinelerra/cinelerra-5.1/bin/plugins PluginFFilter::new_ffilter(overlay_opencl) err: Input/output error PluginFFilter::new_ffilter(xfade_opencl) err: Input/output error [openclsrc_814 @ 0xb78f400] OpenCL source requires output dimensions to be specified. PluginFFilter::new_ffilter(openclsrc) err: Invalid argument bctheme.C:458:15: runtime error: load of misaligned address 0x098a364d for type 'int', which requires 4 byte alignment 0x098a364d: note: pointer points here 45 47 27 00 48 21 00 00 31 30 38 30 74 6f 34 38 30 2e 70 6e 67 00 00 00 00 00 31 30 38 30 74 6f ^ Total excess of backups: -50 Session time: 0:00:07 Cpu time: user: 0:00:03.699 sys: 0:00:00.480
so patch below fixes this error.
Can you please test it on various arches and distros?
diff --git a/cinelerra-5.1/guicast/bctheme.C b/cinelerra-5.1/guicast/bctheme.C index 1ec64c7f..9addf9f7 100644 --- a/cinelerra-5.1/guicast/bctheme.C +++ b/cinelerra-5.1/guicast/bctheme.C @@ -455,7 +455,10 @@ void BC_Theme::overlay(VFrame *dst, VFrame *src, int in_x1, int in_x2, int shift
void BC_Theme::set_data(unsigned char *ptr) { - int hdr_sz = *(int*)ptr - sizeof(int); + //int hdr_sz = *(int*)ptr - sizeof(int); + int hdr_sz = 0; + memcpy(&hdr_sz, ptr, sizeof(int)); + hdr_sz -= sizeof(int); unsigned char *cp = ptr + sizeof(int); unsigned char *dp = cp + hdr_sz; int start_item = images.size(); lines 7-28/28 (END)
-- Андрей Рандрианасулу
пт, 2 дек. 2022 г., 01:16 Phyllis Smith <[email protected]>:
ANDREW, Perhaps I duplicated this incorrectly, but when I add after the line CFLAGS += $(static_incs) the line CFLAGS += -Wall -fsanitize=alignment in guicast/Makefile to demonstrate the problem, I just get compiler errors. I also set the environment variable LDFLAGS and when I do echo $LDFLAGS it shows -fsanitize=alignment .
I set LDFLAGS for this case before make command like (from bash history) LDFLAGS=-fsanitize=alignment make -j 8 and this make was called in cinelerra directory (and before this in guicast directory), not from top level where autogen.sh and configure lives. but you can add LDFLAGS directly to cinelerra/Makefile too, I think. Did I make a mistake? Did I miss a step? The only steps I read in your
email was: (1) modify guicast/Makefile to add another CFLAGS line
I also added it to cinelerra/Makefile lately just to see if main program had additional problems, thankfully (?) I saw no more errors during playback
(2) set environment variable for LDFLAGS (before LDFLAGS had no value)
See below for the end of my log file.
/usr/bin/ld:
/tmp/cinelerra-5.1/cinelerra/../guicast/x86_64/libguicast.a(bclistboxitem.o): in function `BC_ListBoxItem::compare_item_text(void const*, void const*)': /tmp/cinelerra-5.1/guicast/bclistboxitem.C:162: undefined reference to `__ubsan_handle_type_mismatch_v1' /usr/bin/ld: /tmp/cinelerra-5.1/guicast/bclistboxitem.C:163: undefined reference to `__ubsan_handle_type_mismatch_v1' /usr/bin/ld: /tmp/cinelerra-5.1/guicast/bclistboxitem.C:163: undefined reference to `__ubsan_handle_type_mismatch_v1' /usr/bin/ld: /tmp/cinelerra-5.1/guicast/bclistboxitem.C:162: undefined reference to `__ubsan_handle_type_mismatch_v1' /usr/bin/ld: /tmp/cinelerra-5.1/cinelerra/../guicast/x86_64/libguicast.a(bclistboxitem.o): in function `ArrayList<BC_ListBoxItem*>::del(BC_ListBoxItem*&)':
/tmp/cinelerra-5.1/guicast/arraylist.h:14: undefined reference to
`__ubsan_handle_type_mismatch_v1' /usr/bin/ld: /tmp/cinelerra-5.1/cinelerra/../guicast/x86_64/libguicast.a(bclistboxitem.o):/tmp/cinelerra-5.1/guicast/arraylist.h:14: more undefined references to `__ubsan_handle_type_mismatch_v1' follow collect2: error: ld returned 1 exit status make[2]: *** [Makefile:607: x86_64/lv2ui] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/tmp/cinelerra-5.1/cinelerra' make[1]: *** [Makefile:582: all-recursive] Error 1 make[1]: Leaving directory '/tmp/cinelerra-5.1'
make: *** [Makefile:529: all] Error 2
On Wed, Nov 23, 2022 at 11:37 PM Andrew Randrianasulu < [email protected]> wrote:
---------- Forwarded message --------- От: Андрей Рандрианасулу <[email protected]> Date: чт, 24 нояб. 2022 г., 09:33 Subject: unaligned load in bctheme To: randrianasulu <[email protected]>
so i tried to instrument cingg to see if she does any unaligned access
I added
diff --git a/cinelerra-5.1/guicast/Makefile b/cinelerra-5.1/guicast/Makefile index 04d5a2e5..b724c668 100644 --- a/cinelerra-5.1/guicast/Makefile +++ b/cinelerra-5.1/guicast/Makefile @@ -116,6 +116,7 @@ UTILS = $(OBJDIR)/bootstrap $(OBJDIR)/pngtoh $(OBJDIR)/pngto raw BCXFER = xfer/$(OBJDIR)/xfer.stamp
CFLAGS += $(static_incs) +CFLAGS += -Wall -fsanitize=alignment
$(shell echo $(CFLAGS) > $(OBJDIR)/c_flags) $(shell echo $(OBJS) > $(OBJDIR)/objs)
and same -fsanitize=alignment to LDFLAGS env. variable before make.
I got this:
bash-5.1$ /dev/shm/cinelerra/cinelerra-5.1/bin/cin Cinelerra Infinity - built: Nov 24 2022 08:52:45 git://git.cinelerra-gg.org/goodguy/cinelerra.git (c) 2006-2019 Heroine Virtual Ltd. by Adam Williams 2007-2020 mods for Cinelerra-GG by W.P.Morrow aka goodguy Cinelerra is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. There is absolutely no warranty for Cinelerra.
build plugin index for: /dev/shm/cinelerra/cinelerra-5.1/bin/plugins PluginFFilter::new_ffilter(overlay_opencl) err: Input/output error PluginFFilter::new_ffilter(xfade_opencl) err: Input/output error [openclsrc_814 @ 0xb78f400] OpenCL source requires output dimensions to be specified. PluginFFilter::new_ffilter(openclsrc) err: Invalid argument bctheme.C:458:15: runtime error: load of misaligned address 0x098a364d for type 'int', which requires 4 byte alignment 0x098a364d: note: pointer points here 45 47 27 00 48 21 00 00 31 30 38 30 74 6f 34 38 30 2e 70 6e 67 00 00 00 00 00 31 30 38 30 74 6f ^ Total excess of backups: -50 Session time: 0:00:07 Cpu time: user: 0:00:03.699 sys: 0:00:00.480
so patch below fixes this error.
Can you please test it on various arches and distros?
diff --git a/cinelerra-5.1/guicast/bctheme.C b/cinelerra-5.1/guicast/bctheme.C index 1ec64c7f..9addf9f7 100644 --- a/cinelerra-5.1/guicast/bctheme.C +++ b/cinelerra-5.1/guicast/bctheme.C @@ -455,7 +455,10 @@ void BC_Theme::overlay(VFrame *dst, VFrame *src, int in_x1, int in_x2, int shift
void BC_Theme::set_data(unsigned char *ptr) { - int hdr_sz = *(int*)ptr - sizeof(int); + //int hdr_sz = *(int*)ptr - sizeof(int); + int hdr_sz = 0; + memcpy(&hdr_sz, ptr, sizeof(int)); + hdr_sz -= sizeof(int); unsigned char *cp = ptr + sizeof(int); unsigned char *dp = cp + hdr_sz; int start_item = images.size(); lines 7-28/28 (END)
-- Андрей Рандрианасулу
so i tried to instrument cingg to see if she does any unaligned access
I added
diff --git a/cinelerra-5.1/guicast/Makefile b/cinelerra-5.1/guicast/Makefile index 04d5a2e5..b724c668 100644 --- a/cinelerra-5.1/guicast/Makefile +++ b/cinelerra-5.1/guicast/Makefile @@ -116,6 +116,7 @@ UTILS = $(OBJDIR)/bootstrap $(OBJDIR)/pngtoh $(OBJDIR)/pngto raw BCXFER = xfer/$(OBJDIR)/xfer.stamp
CFLAGS += $(static_incs) +CFLAGS += -Wall -fsanitize=alignment
$(shell echo $(CFLAGS) > $(OBJDIR)/c_flags) $(shell echo $(OBJS) > $(OBJDIR)/objs)
and same -fsanitize=alignment to LDFLAGS env. variable before make.
On 4 different systems I was only able to include in guicast/Makefile, the CFLAGS += $(-fsanitize=alignment) and set the LDFLAGS environment variable to -fsanitize=alignment in order to compile. But when I ran bin/cin I never got any errors of the type "bctheme.C:458:15: runtime error: load of misaligned address". This was Fedora 32, Ubuntu 16, Debian 32-bit 9.1, and Debian 11.0. I only loaded a file, played a little of it, and added a plugin as a test (maybe there was something in particular I should have tried?)
so patch below fixes this error.
Can you please test it on various arches and distros?
diff --git a/cinelerra-5.1/guicast/bctheme.C b/cinelerra-5.1/guicast/bctheme.C index 1ec64c7f..9addf9f7 100644 --- a/cinelerra-5.1/guicast/bctheme.C +++ b/cinelerra-5.1/guicast/bctheme.C @@ -455,7 +455,10 @@ void BC_Theme::overlay(VFrame *dst, VFrame *src, int in_x1, int in_x2, int shift
void BC_Theme::set_data(unsigned char *ptr) { - int hdr_sz = *(int*)ptr - sizeof(int); + //int hdr_sz = *(int*)ptr - sizeof(int); + int hdr_sz = 0; + memcpy(&hdr_sz, ptr, sizeof(int)); + hdr_sz -= sizeof(int); unsigned char *cp = ptr + sizeof(int); unsigned char *dp = cp + hdr_sz; int start_item = images.size(); lines 7-28/28 (END)
Next I added the above patch, and all 4 systems compiled and ran the same
limited set of commands to load and play a video file. So it seems OK to check into GIT. Just to verify, only the bctheme.C patch should be checked in - right?
вс, 4 дек. 2022 г., 03:39 Phyllis Smith <[email protected]>:
so i tried to instrument cingg to see if she does any unaligned access
I added
diff --git a/cinelerra-5.1/guicast/Makefile b/cinelerra-5.1/guicast/Makefile index 04d5a2e5..b724c668 100644 --- a/cinelerra-5.1/guicast/Makefile +++ b/cinelerra-5.1/guicast/Makefile @@ -116,6 +116,7 @@ UTILS = $(OBJDIR)/bootstrap $(OBJDIR)/pngtoh $(OBJDIR)/pngto raw BCXFER = xfer/$(OBJDIR)/xfer.stamp
CFLAGS += $(static_incs) +CFLAGS += -Wall -fsanitize=alignment
$(shell echo $(CFLAGS) > $(OBJDIR)/c_flags) $(shell echo $(OBJS) > $(OBJDIR)/objs)
and same -fsanitize=alignment to LDFLAGS env. variable before make.
On 4 different systems I was only able to include in guicast/Makefile, the CFLAGS += $(-fsanitize=alignment) and set the LDFLAGS environment variable to -fsanitize=alignment in order to compile. But when I ran bin/cin I never got any errors of the type "bctheme.C:458:15: runtime error: load of misaligned address". This was Fedora 32, Ubuntu 16, Debian 32-bit 9.1, and Debian 11.0. I only loaded a file, played a little of it, and added a plugin as a test (maybe there was something in particular I should have tried?)
no, it was right on startup on Slackware 15.0 (mostly) 32-bit over 64-bit kernel.... I'll try on ppc32 machine hopefully soon (ppc/sparc/alpha said to be much more sensitive to such errors)
so patch below fixes this error.
Can you please test it on various arches and distros?
diff --git a/cinelerra-5.1/guicast/bctheme.C b/cinelerra-5.1/guicast/bctheme.C index 1ec64c7f..9addf9f7 100644 --- a/cinelerra-5.1/guicast/bctheme.C +++ b/cinelerra-5.1/guicast/bctheme.C @@ -455,7 +455,10 @@ void BC_Theme::overlay(VFrame *dst, VFrame *src, int in_x1, int in_x2, int shift
void BC_Theme::set_data(unsigned char *ptr) { - int hdr_sz = *(int*)ptr - sizeof(int); + //int hdr_sz = *(int*)ptr - sizeof(int); + int hdr_sz = 0; + memcpy(&hdr_sz, ptr, sizeof(int)); + hdr_sz -= sizeof(int); unsigned char *cp = ptr + sizeof(int); unsigned char *dp = cp + hdr_sz; int start_item = images.size(); lines 7-28/28 (END)
Next I added the above patch, and all 4 systems compiled and ran the same
limited set of commands to load and play a video file. So it seems OK to check into GIT. Just to verify, only the bctheme.C patch should be checked in - right?
On 4 different systems I was only able to include in guicast/Makefile, the
CFLAGS += $(-fsanitize=alignment) and set the LDFLAGS environment variable to -fsanitize=alignment in order to compile. But when I ran bin/cin I never got any errors of the type "bctheme.C:458:15: runtime error: load of misaligned address". This was Fedora 32, Ubuntu 16, Debian 32-bit 9.1, and Debian 11.0. I only loaded a file, played a little of it, and added a plugin as a test (maybe there was something in particular I should have tried?)
no, it was right on startup on Slackware 15.0 (mostly) 32-bit over 64-bit kernel....
I'll try on ppc32 machine hopefully soon (ppc/sparc/alpha said to be much more sensitive to such errors)
That was Debian 11.0 32-bit that I tested it on, not 64 bit. If the patch fixes it for Slackware 15.0 and since it does not seem to add any problems for other distros, we can check it into GIT. I just do not understand the patch at all because I don't know C code and can not tell if the code is better with essentially the same outcome.
вс, 4 дек. 2022 г., 17:51 Phyllis Smith <[email protected]>:
On 4 different systems I was only able to include in guicast/Makefile, the
CFLAGS += $(-fsanitize=alignment) and set the LDFLAGS environment variable to -fsanitize=alignment in order to compile. But when I ran bin/cin I never got any errors of the type "bctheme.C:458:15: runtime error: load of misaligned address". This was Fedora 32, Ubuntu 16, Debian 32-bit 9.1, and Debian 11.0. I only loaded a file, played a little of it, and added a plugin as a test (maybe there was something in particular I should have tried?)
no, it was right on startup on Slackware 15.0 (mostly) 32-bit over 64-bit kernel....
I'll try on ppc32 machine hopefully soon (ppc/sparc/alpha said to be much more sensitive to such errors)
That was Debian 11.0 32-bit that I tested it on, not 64 bit. If the patch fixes it for Slackware 15.0 and since it does not seem to add any problems for other distros, we can check it into GIT.
may be it only fires when I run 32-bit cingg over 64 bit kernel? Sorry I still not performed any experimentation due to some coughing type of health problems I just do not understand the patch at all because I don't know C code and
can not tell if the code is better with essentially the same outcome.
Explanation I found on the web says it fixes it because memcpy from libc and thus know how and where align things https://hackaday.com/2022/05/10/data-alignment-across-architectures-the-good...
Andrew, thanks for the website reference. Checked in patch to GIT this morning. I do not think you need to go out of your way to test and build on other systems. Thanks, Phyllis On Mon, Dec 5, 2022 at 4:14 AM Andrew Randrianasulu <[email protected]> wrote:
вс, 4 дек. 2022 г., 17:51 Phyllis Smith <[email protected]>:
On 4 different systems I was only able to include in guicast/Makefile,
the CFLAGS += $(-fsanitize=alignment) and set the LDFLAGS environment variable to -fsanitize=alignment in order to compile. But when I ran bin/cin I never got any errors of the type "bctheme.C:458:15: runtime error: load of misaligned address". This was Fedora 32, Ubuntu 16, Debian 32-bit 9.1, and Debian 11.0. I only loaded a file, played a little of it, and added a plugin as a test (maybe there was something in particular I should have tried?)
no, it was right on startup on Slackware 15.0 (mostly) 32-bit over 64-bit kernel....
I'll try on ppc32 machine hopefully soon (ppc/sparc/alpha said to be much more sensitive to such errors)
That was Debian 11.0 32-bit that I tested it on, not 64 bit. If the patch fixes it for Slackware 15.0 and since it does not seem to add any problems for other distros, we can check it into GIT.
may be it only fires when I run 32-bit cingg over 64 bit kernel? Sorry I still not performed any experimentation due to some coughing type of health problems
I just do not understand the patch at all because I don't know C code
and can not tell if the code is better with essentially the same outcome.
Explanation I found on the web says it fixes it because memcpy from libc and thus know how and where align things
https://hackaday.com/2022/05/10/data-alignment-across-architectures-the-good...
participants (2)
-
Andrew Randrianasulu -
Phyllis Smith