On Wed, Jun 21, 2006 at 10:10:57PM +0200, Mattia Dongili wrote:
> Hello,
> 
> I need some help with this bug, I'm quite convinced it's not a cpufreqd
> bug but I'm asking before reassigning (glibc or kernel?).

Well I am afraid you are wrong. It is not because a backtrace ends in a
glibc function that the bug is here.

In your case, it's because cpufreqd is using a va_list twice. It does
not work. Well it works on i386, but it is guaranteed to fail on all
other architectures. Please see man stdarg for more information.

The patch below should fix your problem (not tested).

Bye,
Aurelien


--- src/cpufreqd_log.c.orig     2006-06-22 01:26:35.824545653 +0200
+++ src/cpufreqd_log.c  2006-06-22 01:27:01.965258672 +0200
@@ -44,12 +44,14 @@
  */
 void cpufreqd_log(int prio, const char *fmt, ...) {
        va_list argp;
+       va_list argp2;
 
        /* do we need to write? */
        if (configuration->log_level < prio)
                return;
 
        va_start(argp, fmt);
+       va_copy(argp2, argp);
 
        if (configuration->no_daemon) {
                if (configuration->log_level <= LOG_ERR) {
@@ -67,9 +69,10 @@
                }
                vsyslog(prio, fmt, argp);
                if (configuration->log_level <= LOG_ERR) {
-                       vfprintf(stderr, fmt, argp);
+                       vfprintf(stderr, fmt, argp2);
                        /* fflush(stderr); */
                }
        }
        va_end(argp);
+       va_end(argp2);
 }

-- 
  .''`.  Aurelien Jarno             | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [EMAIL PROTECTED]         | [EMAIL PROTECTED]
   `-    people.debian.org/~aurel32 | www.aurel32.net


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to