Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] RyzenAdj: fix segfault on musl.
@ 2021-03-24 19:37 ericonr
  2021-03-24 19:48 ` [PR PATCH] [Merged]: " ericonr
  0 siblings, 1 reply; 2+ messages in thread
From: ericonr @ 2021-03-24 19:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1588 bytes --]

There is a new pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages ry
https://github.com/void-linux/void-packages/pull/29728

RyzenAdj: fix segfault on musl.
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/29728.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ry-29728.patch --]
[-- Type: text/x-diff, Size: 2479 bytes --]

From f075f54ccb97dafbf043355432542c2474dc7f20 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Wed, 24 Mar 2021 16:35:59 -0300
Subject: [PATCH] RyzenAdj: fix segfault on musl.

---
 .../RyzenAdj/patches/heap-corruption.patch    | 36 +++++++++++++++++++
 srcpkgs/RyzenAdj/template                     |  3 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/RyzenAdj/patches/heap-corruption.patch

diff --git a/srcpkgs/RyzenAdj/patches/heap-corruption.patch b/srcpkgs/RyzenAdj/patches/heap-corruption.patch
new file mode 100644
index 000000000000..6b8fc81267f0
--- /dev/null
+++ b/srcpkgs/RyzenAdj/patches/heap-corruption.patch
@@ -0,0 +1,36 @@
+From 6efee1997c468150f472941f0f183fc054b436a4 Mon Sep 17 00:00:00 2001
+From: unknown <Falcosc@users.noreply.github.com>
+Date: Sat, 27 Feb 2021 01:26:18 +0100
+Subject: [PATCH] fix Heap corruption
+
+---
+ lib/nb_smu_ops.c | 2 +-
+ lib/ryzenadj.h   | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/nb_smu_ops.c b/lib/nb_smu_ops.c
+index 965264c..2c31b48 100644
+--- a/lib/nb_smu_ops.c
++++ b/lib/nb_smu_ops.c
+@@ -45,7 +45,7 @@ smu_t get_smu(nb_t nb, int smu_type) {
+ 	uint32_t rep; /* REP of test message */
+ 	smu_service_args_t arg = {0, 0, 0, 0, 0, 0}; /* Test message shuld have no arguments */
+ 
+-	smu = (smu_t)malloc((sizeof(smu_t)));
++	smu = (smu_t)malloc((sizeof(*smu)));
+ 	smu->nb = nb;
+ 	/* Fill SMU information */
+ 	switch(smu_type){
+diff --git a/lib/ryzenadj.h b/lib/ryzenadj.h
+index 6f18ade..90c94ee 100644
+--- a/lib/ryzenadj.h
++++ b/lib/ryzenadj.h
+@@ -10,7 +10,7 @@ extern "C" {
+ 
+ #define RYZENADJ_REVISION_VER 0
+ #define RYZENADJ_MAJOR_VER 7
+-#define RYZENADJ_MINIOR_VER 0
++#define RYZENADJ_MINIOR_VER 1
+ 
+ enum ryzen_family {
+         FAM_UNKNOWN = -1,
diff --git a/srcpkgs/RyzenAdj/template b/srcpkgs/RyzenAdj/template
index fa5a2aa511d5..1ceb4fec1e4a 100644
--- a/srcpkgs/RyzenAdj/template
+++ b/srcpkgs/RyzenAdj/template
@@ -1,7 +1,7 @@
 # Template file for 'RyzenAdj'
 pkgname=RyzenAdj
 version=0.7.0
-revision=1
+revision=2
 archs="x86_64*"
 build_style=cmake
 makedepends="pciutils-devel"
@@ -11,6 +11,7 @@ license="LGPL-3.0-only"
 homepage="https://github.com/FlyGoat/RyzenAdj"
 distfiles="https://github.com/FlyGoat/RyzenAdj/archive/v${version}.tar.gz"
 checksum=fff8a08e657ba35f919bd564fbe2e15e7c615ac6e2a357ffcc3472069e8081f6
+patch_args=-Np1
 
 do_install() {
 	vbin build/ryzenadj

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Merged]: RyzenAdj: fix segfault on musl.
  2021-03-24 19:37 [PR PATCH] RyzenAdj: fix segfault on musl ericonr
@ 2021-03-24 19:48 ` ericonr
  0 siblings, 0 replies; 2+ messages in thread
From: ericonr @ 2021-03-24 19:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1442 bytes --]

There's a merged pull request on the void-packages repository

RyzenAdj: fix segfault on musl.
https://github.com/void-linux/void-packages/pull/29728

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-24 19:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 19:37 [PR PATCH] RyzenAdj: fix segfault on musl ericonr
2021-03-24 19:48 ` [PR PATCH] [Merged]: " ericonr

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 NNTP newsgroup(s).