From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4419 Path: news.gmane.org!not-for-mail From: James Gregurich Newsgroups: gmane.linux.lib.musl.general Subject: Re: mistake in powerpc clone.s? Date: Fri, 27 Dec 2013 16:34:30 -0600 Message-ID: <7F719E8E-5B66-4A9A-AB4C-8505740090C4@mac.com> References: <6CBC4CE2-CFF2-4FE6-8DD5-6FB2B1FCBA4A@mac.com> <52BCDE8A.3060304@barfooze.de> <687A82F2-D0DB-48DF-8027-CFAC49F93B9C@mac.com> <20131227034201.GE24286@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_47D9B125-0F0E-4325-9193-C7576E06B7B0" X-Trace: ger.gmane.org 1388183698 29426 80.91.229.3 (27 Dec 2013 22:34:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Dec 2013 22:34:58 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4423-gllmg-musl=m.gmane.org@lists.openwall.com Fri Dec 27 23:35:03 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Vwfzh-0005NN-EB for gllmg-musl@plane.gmane.org; Fri, 27 Dec 2013 23:35:01 +0100 Original-Received: (qmail 20461 invoked by uid 550); 27 Dec 2013 22:35:00 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 20453 invoked from network); 27 Dec 2013 22:35:00 -0000 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.87,1.0.14,0.0.0000 definitions=2013-12-27_05:2013-12-27,2013-12-27,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=1 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1308280000 definitions=main-1312270162 In-reply-to: X-Mailer: Apple Mail (2.1827) Xref: news.gmane.org gmane.linux.lib.musl.general:4419 Archived-At: --Apple-Mail=_47D9B125-0F0E-4325-9193-C7576E06B7B0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 a followup=85 GDB log example. this is what one typically sees. I edited out the = private source code info. A message like that can easily send one = chasing wild geese when he is hunting for a fault. =20 (gdb) bt #0 c::f (this=3D0x0, dmxData=3D0x19cea20 "") at #1 0x0182e5e0 in c::f (this=3D0x1a1e860,=20 enabledPorts=3D0x48015cb8) at #2 0x0182e4c0 in c::f (this=3D) at #3 0x0181fdd8 in c::f (this=3D) at #4 0x0181faf4 in c::f (arg=3D0x1a1e860) at #5 0x0190ff20 in start (p=3D0x48015d40) at = src/thread/pthread_create.c:104 #6 0x01922e54 in clone () Backtrace stopped: frame did not save the PC (gdb)=20 On Dec 26, 2013, at 9:45 PM, James Gregurich = wrote: > If you want me to try a patch, let me know. >=20 > BTW: I have an actual crash in my app that appears to be a stack = corruption. I was following up on that message to see if it was relevant = to the crash. >=20 > -James >=20 >=20 > On Dec 26, 2013, at 9:42 PM, Rich Felker wrote: >=20 >> On Thu, Dec 26, 2013 at 09:13:59PM -0600, James Gregurich wrote: >>>=20 >>>=20 >>> When I debug my app in gdb, I consistently get =93Backtrace stopped: >>> previous frame inner to this frame (corrupt stack?)=94 at the lower >>> end of the backtrace. I set break points at each function in the >>> back trace and that message persists up to the __clone() invocation. >>> until that line that I pointed out, the backtrace is normal. Once >>> that instruction is executed, the backtrace is permanently broken >>> for that thread. >>=20 >> In the backtrace for a thread other than the main thread, it's normal >> and expected for the backtrace to end at __clone; it's where the >> thread started. The "corrupt stack" message is unwanted (musl should >> be arranging for the frame pointer to be zero so that debuggers >> recognize that there's nothing else on the stack, and maybe this = needs >> fixing) but I don't think it's necessarily indicative of any bug. >>=20 >> Rich >=20 --Apple-Mail=_47D9B125-0F0E-4325-9193-C7576E06B7B0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252
a = followup=85


GDB log example. =  this is what one typically sees. I edited out the private source = code info. A message like that can easily send one chasing wild geese = when he is hunting for a = fault.
 

(gdb) bt
#0  = c::f (this=3D0x0, dmxData=3D0x19cea20 "")
    at <source = location>
#1  0x0182e5e0 in c::f = (this=3D0x1a1e860, 
    = enabledPorts=3D0x48015cb8)
    at <source = location>
#2  0x0182e4c0 in c::f (this=3D<optimized = out>)
    at <source location>
#3  = 0x0181fdd8 in c::f (this=3D<optimized out>)
  =   at <source location>
#4  0x0181faf4 in c::f = (arg=3D0x1a1e860)
    at <source location>
#5  = 0x0190ff20 in start (p=3D0x48015d40) at = src/thread/pthread_create.c:104
#6  0x01922e54 in clone = ()
Backtrace stopped: frame did not save the PC
(gdb) 




On Dec 26, 2013, at 9:45 PM, James Gregurich <bayoubengal@mac.com> = wrote:

If you want me to try a patch, let me know.

BTW: I = have an actual crash in my app that appears to be a stack corruption. I = was following up on that message to see if it was relevant to the = crash.

-James


On Dec 26, 2013, at 9:42 PM, Rich Felker = <dalias@aerifal.cx> = wrote:

On Thu, Dec 26, 2013 at = 09:13:59PM -0600, James Gregurich wrote:


When I debug my app in gdb, I consistently get = =93Backtrace stopped:
previous frame inner to this frame (corrupt = stack?)=94 at the lower
end of the backtrace. I set break points at = each function in the
back trace and that message persists up to the = __clone() invocation.
until that line that I pointed out, the = backtrace is normal. Once
that instruction is executed, the backtrace = is permanently broken
for that thread.

In the = backtrace for a thread other than the main thread, it's normal
and = expected for the backtrace to end at __clone; it's where the
thread = started. The "corrupt stack" message is unwanted (musl should
be = arranging for the frame pointer to be zero so that = debuggers
recognize that there's nothing else on the stack, and maybe = this needs
fixing) but I don't think it's necessarily indicative of = any = bug.

Rich


= --Apple-Mail=_47D9B125-0F0E-4325-9193-C7576E06B7B0--