Subject: Re: static functions
To: =?ISO-8859-2?Q?J=F6rn_Seger?= <joern.seger@udo.edu>
From: Jaromir Dolecek <jdolecek@NetBSD.org>
List: tech-kern
Date: 05/10/2004 19:14:09
J=F6rn Seger wrote:
> ok, maybe I'm completely on the wrong track. I have had some strange=20
> behaviours on a testimplementation of a new protocol, which sends keep al=
ive=20
> packets periodicly. I experienced, that the kernel crashes (without direc=
t=20
> connection to my code and sadly without a panic or trace). When I used a=
=20
> static version of my periodicly called function, this problem disappeared=
.=20

Compiler might inline the function when it's static, or perhaps
it's some kind of misoptimization. I'd recomment to compile the file
in question with -O0, so that you'd find out if it's compiler
fault or not.

Jaromir
> But when there is no real (fundamental) difference between static and=20
> "normal" function calls, I really need to have a look at my code again!
>=20
> The problem takes place, when I copy a lot of data e.g. via "scp". It's r=
eally=20
> hard to debug things like these, does someone had a similar problem and s=
ome=20
> ideas how to recognize/debug them!?
>=20
> Thanks - J_rn
>=20

--=20
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.cz/
-=3D- We should be mindful of the potential goal, but as the Buddhist -=3D-
-=3D- masters say, ``You may notice during meditation that you        -=3D-
-=3D- sometimes levitate or glow.   Do not let this distract you.''   -=3D-