public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/110631] Bug in FIO.WriteCardinal Date: Sat, 22 Jul 2023 09:02:34 +0000 [thread overview] Message-ID: <bug-110631-4-nTVv2FCkCo@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-110631-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110631 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Gaius Mulley <gaius@gcc.gnu.org>: https://gcc.gnu.org/g:73cc6ce1294ec35e9322b1bbc91009cfc76f732b commit r14-2725-g73cc6ce1294ec35e9322b1bbc91009cfc76f732b Author: Gaius Mulley <gaiusmod2@gmail.com> Date: Sat Jul 22 10:01:02 2023 +0100 PR modula2/110631 Bugfix to FIO WriteCardinal FIO.WriteCardinal fails to write binary data. This patch fixes two bugs in FIO.mod and provides a testcase which writes and reads binary cardinals. There was an off by one error when using HIGH (a) to determine the number of bytes and the dest/src pointers were switched when calling memcpy. gcc/m2/ChangeLog: PR modula2/110631 * gm2-libs/FIO.def (ReadAny): Correct comment as HIGH (a) + 1 is number of bytes. (WriteAny): Correct comment as HIGH (a) + 1 is number of bytes. * gm2-libs/FIO.mod (ReadAny): Correct comment as HIGH (a) + 1 is number of bytes. Also pass HIGH (a) + 1 to BufferedRead. (WriteAny): Correct comment as HIGH (a) + 1 is number of bytes. Also pass HIGH (a) + 1 to BufferedWrite. (BufferedWrite): Rename parameter a to src, rename variable t to dest. Correct parameter order to memcpy. gcc/testsuite/ChangeLog: PR modula2/110631 * gm2/pimlib/run/pass/testfiobinary.mod: New test. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
next prev parent reply other threads:[~2023-07-22 9:02 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-07-11 15:52 [Bug modula2/110631] New: " gaius at gcc dot gnu.org 2023-07-11 15:53 ` [Bug modula2/110631] " gaius at gcc dot gnu.org 2023-07-22 7:32 ` gaius at gcc dot gnu.org 2023-07-22 9:02 ` cvs-commit at gcc dot gnu.org [this message] 2023-07-22 9:04 ` gaius at gcc dot gnu.org 2023-07-30 20:45 ` cvs-commit at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-110631-4-nTVv2FCkCo@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).