[PATCH staging] gnu: mrustc: Fix deserialization bug in communication with the procedural macro compiler plugin.

  • Done
  • quality assurance status badge
Details
2 participants
  • Chris Marusich
  • Danny Milosavljevic
Owner
unassigned
Submitted by
Danny Milosavljevic
Severity
normal

Debbugs page

Danny Milosavljevic wrote 6 years ago
(address . guix-patches@gnu.org)
20190204113952.22758-1-dannym@scratchpost.org
* gnu/packages/patches/mrustc-0.8.0-fix-variable-length-integer-receiving.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/rust.scm (mrustc)[source]: Use it.

Co-authored-by: Chris Marusich <cmmarusich@gmail.com>
---
gnu/local.mk | 1 +
....0-fix-variable-length-integer-receiving.patch | 15 +++++++++++++++
gnu/packages/rust.scm | 12 ++++++++++--
3 files changed, 26 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/mrustc-0.8.0-fix-variable-length-integer-receiving.patch

Toggle diff (48 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index f339f32e7..6af0a0407 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1042,6 +1042,7 @@ dist_patch_DATA = \
%D%/packages/patches/mozjs38-tracelogger.patch \
%D%/packages/patches/mozjs38-version-detection.patch \
%D%/packages/patches/mrrescue-support-love-11.patch \
+ %D%/packages/patches/mrustc-0.8.0-fix-variable-length-integer-receiving.patch \
%D%/packages/patches/mumble-1.2.19-abs.patch \
%D%/packages/patches/mumps-build-parallelism.patch \
%D%/packages/patches/mupen64plus-ui-console-notice.patch \
diff --git a/gnu/packages/patches/mrustc-0.8.0-fix-variable-length-integer-receiving.patch b/gnu/packages/patches/mrustc-0.8.0-fix-variable-length-integer-receiving.patch
new file mode 100644
index 000000000..9e76653a0
--- /dev/null
+++ b/gnu/packages/patches/mrustc-0.8.0-fix-variable-length-integer-receiving.patch
@@ -0,0 +1,15 @@
+https://github.com/thepowersgang/mrustc/issues/109
+From: Danny Milosavljevic <dannym@scratchpost.org>
+Date: Fri, 3 Jan 2019 13:00:00 +0100
+
+--- mrustc/src/expand/proc_macro.cpp.orig 2019-02-01 14:16:54.208486062 +0100
++++ mrustc/src/expand/proc_macro.cpp 2019-02-01 14:17:14.350925705 +0100
+@@ -977,7 +977,7 @@
+ for(;;)
+ {
+ auto b = recv_u8();
+- v |= static_cast<uint64_t>(b) << ofs;
++ v |= static_cast<uint64_t>(b & 0x7F) << ofs;
+ if( (b & 0x80) == 0 )
+ break;
+ ofs += 7;
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 501736d89..e128bb22b 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -105,7 +105,9 @@
(file-name (git-file-name name version))
(sha256
(base32
- "0a7v8ccyzp1sdkwni8h1698hxpfz2sxhcpx42n6l2pbm0rbjp08i"))))
+ "0a7v8ccyzp1sdkwni8h1698hxpfz2sxhcpx42n6l2pbm0rbjp08i"))
+ (patches
+ (search-patches "mrustc-0.8.0-fix-variable-length-integer-receiving.patch"))))
(outputs '("out" "cargo"))
(build-system gnu-build-system)
(inputs
Chris Marusich wrote 6 years ago
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . guix-patches@gnu.org)
875zttwd17.fsf@gmail.com
Danny Milosavljevic <dannym@scratchpost.org> writes:

Toggle quote (7 lines)
> * gnu/packages/patches/mrustc-0.8.0-fix-variable-length-integer-receiving.patch:
> New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/rust.scm (mrustc)[source]: Use it.
>
> Co-authored-by: Chris Marusich <cmmarusich@gmail.com>

LGTM! I can't remember - did you submit this patch upstream, also?

--
Chris
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlxelwQACgkQ3UCaFdgi
Rp1G/Q//Zomr3mNV1t7rUb1XutEWc7DKic3GkOsuR9b1GRY33Dc5dhREO1AHI93R
//Wulr8KdIKEzWnAMkfqvCX5ATZLaoUNLZ884KDtE82qrICU7V38kV/gzYg4mkpj
Re8r4A3PTgvyP8Pu7GQS1w3AfTKdqnGgFTYqkBi/+Rgq6CxxE86x5tua0SbwG6xf
y1vST8BqYFjkj/zVY2mypfTGwGoo4WDXv8bg2vGz9lhpS86dqyrYGkapwbzbM4tD
CLrlzTeaOltIZwz1B2u/maIgdZiSHNHTPfbzvULXzFSvyGpxOEqb4VtGccJdOUGy
WwYU1j+0VTZtW55+hfJfa2VFzESES3C+wj+rMXBSWWeWeSC8Bw4Jm2X6FK6UkR3H
Ple3iWetbhqylVJUnt0FQqCCz1TtNvFdTxIKy9fgqG/KKyXSCmDr+VF1Nbxqpdge
+lg/cLENIeQ6pc/ZDyF7BQhNLLKgcBynvy5Zk+9caYKBkW+PMp6DqKaeDdYKUHPk
3PmCUSi/9EsT0xklaHkVcaUBUWvckX/39NKobUdmVXJ9UKVzLTZhwAuX6l1oXzJJ
HZemt5GZUD8Bxu1cDm33hTjCejbvXeVABt11b73Epv4IgL+YWHyCeQf1lCoG6Tkr
wW+KDrdOcPVsdwI2lCjiUc2l2t/x6bXU55eGyM7RIbgBPL+omi8=
=Z9H0
-----END PGP SIGNATURE-----

Danny Milosavljevic wrote 6 years ago
(name . Chris Marusich)(address . cmmarusich@gmail.com)(address . 34310-done@debbugs.gnu.org)
20190213133502.66afd72d@scratchpost.org
Hi Chris,

thanks! Pushed to staging.

On Sat, 09 Feb 2019 01:01:56 -0800
Chris Marusich <cmmarusich@gmail.com> wrote:

Toggle quote (2 lines)
> I can't remember - did you submit this patch upstream, also?

Yes, the incident is https://github.com/thepowersgang/mrustc/issues/109and the pull request is https://github.com/thepowersgang/mrustc/pull/111 which has been merged to mrustc master.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlxkDvYACgkQ5xo1VCww
uqUD4Af/cfqiDWElIH9WcuEDMDv0Z3tdDEvuhsgz4lP5OAXwV0Pv5+Hfsj6rBu4S
oLV3iBLwYGNpPq4lgk2Gu34JLo3hU88H/3WISkxEKf9hrCf3GcMy0wdCAXez2nJk
lh5LUyfzOiYQaHV5fcxyhV19/CmaFc2K1u0zqQnD7TEnPlnOKyCBW/XS3B607+IX
V5yxvniMcfbrZPO7TvnCUc68jFxF0EmjZ0mcqnYFHSCybD0ngyfALjH6EERe/oWs
RR8dkoIrRW9ZuDmlf75Ycf92yE6zvx0BmB5F232jLlhmVAODbpfFsn7EZurGb8SB
NTQKFifAvojlneAXs/8H5mC469tNBA==
=RKl3
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 34310@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 34310
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help