public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/10602] New: REG_IP() used as lvalue fails on s390x, probably ia64
@ 2009-09-03 22:49 jkenisto at us dot ibm dot com
  2009-09-03 22:54 ` [Bug translator/10602] " jistone at redhat dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jkenisto at us dot ibm dot com @ 2009-09-03 22:49 UTC (permalink / raw)
  To: systemtap

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]

The ia64 and s390x definitions of the REG_IP macro in runtime/regs.h prevent
REG_IP(x) from being assigned to, but stap-generated code includes several lines
of the form
    REG_IP(regs) = something;
At least on s390x, this yields compile errors in pass 4:
/tmp/stapkks1PD/stap_..._4792.c: In function ‘enter_kprobe_probe’:
/tmp/stapkks1PD/stap_..._4792.c:1080: error: lvalue required as left operand of
assignment

I think that this is an artifact of the fix for PR #10458.

-- 
           Summary: REG_IP() used as lvalue fails on s390x, probably ia64
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: jkenisto at us dot ibm dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10602

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug translator/10602] REG_IP() used as lvalue fails on s390x, probably ia64
  2009-09-03 22:49 [Bug translator/10602] New: REG_IP() used as lvalue fails on s390x, probably ia64 jkenisto at us dot ibm dot com
@ 2009-09-03 22:54 ` jistone at redhat dot com
  2009-09-03 23:58 ` jkenisto at us dot ibm dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jistone at redhat dot com @ 2009-09-03 22:54 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jistone at redhat dot com  2009-09-03 22:54 -------
Are you running from git sources?  This seems to be a dupe of PR #10491, which
should be fixed by commit 3d988997.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


http://sourceware.org/bugzilla/show_bug.cgi?id=10602

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug translator/10602] REG_IP() used as lvalue fails on s390x, probably ia64
  2009-09-03 22:49 [Bug translator/10602] New: REG_IP() used as lvalue fails on s390x, probably ia64 jkenisto at us dot ibm dot com
  2009-09-03 22:54 ` [Bug translator/10602] " jistone at redhat dot com
@ 2009-09-03 23:58 ` jkenisto at us dot ibm dot com
  2009-09-04  0:00 ` jkenisto at us dot ibm dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jkenisto at us dot ibm dot com @ 2009-09-03 23:58 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jkenisto at us dot ibm dot com  2009-09-03 23:58 -------
(In reply to comment #1)
> Are you running from git sources?  This seems to be a dupe of PR #10491, which
> should be fixed by commit 3d988997.

Yeah, same bug.  Mike Anderson saw it in 0.9.9, and I didn't have the latest
bits, either.  I scanned for a dup before I reported it, but didn't catch 10491.

I didn't notice your (very prompt) reply until now.  In the meantime I put
together a patch that (I think) solves the problem more completely than the
10491 fix.  I'll attach it.  Unfortunately, it's against my old bits, not the tip.



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andmike at linux dot vnet
                   |                            |dot ibm dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10602

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug translator/10602] REG_IP() used as lvalue fails on s390x, probably ia64
  2009-09-03 22:49 [Bug translator/10602] New: REG_IP() used as lvalue fails on s390x, probably ia64 jkenisto at us dot ibm dot com
  2009-09-03 22:54 ` [Bug translator/10602] " jistone at redhat dot com
  2009-09-03 23:58 ` jkenisto at us dot ibm dot com
@ 2009-09-04  0:00 ` jkenisto at us dot ibm dot com
  2009-09-04  0:34 ` jistone at redhat dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jkenisto at us dot ibm dot com @ 2009-09-04  0:00 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jkenisto at us dot ibm dot com  2009-09-04 00:00 -------
Created an attachment (id=4169)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4169&action=view)
Fixes 10602/10491 for s390x, but not ia64.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10602

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug translator/10602] REG_IP() used as lvalue fails on s390x, probably ia64
  2009-09-03 22:49 [Bug translator/10602] New: REG_IP() used as lvalue fails on s390x, probably ia64 jkenisto at us dot ibm dot com
                   ` (2 preceding siblings ...)
  2009-09-04  0:00 ` jkenisto at us dot ibm dot com
@ 2009-09-04  0:34 ` jistone at redhat dot com
  2009-09-04  4:54 ` andmike at linux dot vnet dot ibm dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jistone at redhat dot com @ 2009-09-04  0:34 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jistone at redhat dot com  2009-09-04 00:33 -------
(In reply to comment #3)
> Created an attachment (id=4169)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4169&action=view)
> Fixes 10602/10491 for s390x, but not ia64.

For ia64, it should look something like:

#define SET_REG_IP(regs, x) \
  (((regs)->cr_iip = (x) & ~3UL), (ia64_psr(regs)->ri = (x) & 3UL))


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10602

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug translator/10602] REG_IP() used as lvalue fails on s390x, probably ia64
  2009-09-03 22:49 [Bug translator/10602] New: REG_IP() used as lvalue fails on s390x, probably ia64 jkenisto at us dot ibm dot com
                   ` (3 preceding siblings ...)
  2009-09-04  0:34 ` jistone at redhat dot com
@ 2009-09-04  4:54 ` andmike at linux dot vnet dot ibm dot com
  2009-09-04  8:40 ` mjw at redhat dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: andmike at linux dot vnet dot ibm dot com @ 2009-09-04  4:54 UTC (permalink / raw)
  To: systemtap

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 912 bytes --]


------- Additional Comments From andmike at linux dot vnet dot ibm dot com  2009-09-04 04:53 -------
Jim, I applied the patch (10602.patch1) that you provide on systemtap-0.9.9 and
it addressed the lvalue issue I was seeing on a SLES11 S390x system. I also
updated my git tree to the current head (commit a5d268f) and ran this version
also. The current tree addressed my lvalue issue also.

While both versions addressed the lvalue issue now I am now seeing a frame size
error.

"/root/andmike/systemtap-a5d268f/share/systemtap/runtime/transport/control.c: In
function ‘_stp_ctl_write_cmd’:
/root/andmike/systemtap-a5d268f/share/systemtap/runtime/transport/control.c:77:
error: frame size of ‘_stp_ctl_write_cmd’ is 288 bytes"



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10602

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug translator/10602] REG_IP() used as lvalue fails on s390x, probably ia64
  2009-09-03 22:49 [Bug translator/10602] New: REG_IP() used as lvalue fails on s390x, probably ia64 jkenisto at us dot ibm dot com
                   ` (4 preceding siblings ...)
  2009-09-04  4:54 ` andmike at linux dot vnet dot ibm dot com
@ 2009-09-04  8:40 ` mjw at redhat dot com
  2009-09-04 18:15 ` jkenisto at us dot ibm dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mjw at redhat dot com @ 2009-09-04  8:40 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From mjw at redhat dot com  2009-09-04 08:40 -------
(In reply to comment #2)
> I didn't notice your (very prompt) reply until now.  In the meantime I put
> together a patch that (I think) solves the problem more completely than the
> 10491 fix.  I'll attach it.  Unfortunately, it's against my old bits, not the tip.

The idea behind your fix is definitely nicer than the fix I made for bug #10941.
Thanks.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10602

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug translator/10602] REG_IP() used as lvalue fails on s390x, probably ia64
  2009-09-03 22:49 [Bug translator/10602] New: REG_IP() used as lvalue fails on s390x, probably ia64 jkenisto at us dot ibm dot com
                   ` (5 preceding siblings ...)
  2009-09-04  8:40 ` mjw at redhat dot com
@ 2009-09-04 18:15 ` jkenisto at us dot ibm dot com
  2009-09-04 18:52 ` jistone at redhat dot com
  2009-09-09 17:37 ` fche at redhat dot com
  8 siblings, 0 replies; 10+ messages in thread
From: jkenisto at us dot ibm dot com @ 2009-09-04 18:15 UTC (permalink / raw)
  To: systemtap

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1347 bytes --]


------- Additional Comments From jkenisto at us dot ibm dot com  2009-09-04 18:15 -------
(In reply to comment #5)
> Jim, I applied the patch (10602.patch1) that you provide on systemtap-0.9.9 and
> it addressed the lvalue issue I was seeing on a SLES11 S390x system. I also
> updated my git tree to the current head (commit a5d268f) and ran this version
> also. The current tree addressed my lvalue issue also.
> 
> While both versions addressed the lvalue issue now I am now seeing a frame size
> error.
> 
> "/root/andmike/systemtap-a5d268f/share/systemtap/runtime/transport/control.c: In
> function ‘_stp_ctl_write_cmd’:
> /root/andmike/systemtap-a5d268f/share/systemtap/runtime/transport/control.c:77:
> error: frame size of ‘_stp_ctl_write_cmd’ is 288 bytes"
> 
> 

Let's track this as a different bug.  Mike, will you open a PR for this?  It'd
be good to include the output from stap --vp 0003 (which will show the gcc
options in use) and cc -v (to get the gcc version number, etc.).

I don't know why a 288-byte frame is considered an error.  Too big for a kernel
function?  I don't see anything in _stp_ctl_write_cmd() that would yield a big
stack frame.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10602

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug translator/10602] REG_IP() used as lvalue fails on s390x, probably ia64
  2009-09-03 22:49 [Bug translator/10602] New: REG_IP() used as lvalue fails on s390x, probably ia64 jkenisto at us dot ibm dot com
                   ` (6 preceding siblings ...)
  2009-09-04 18:15 ` jkenisto at us dot ibm dot com
@ 2009-09-04 18:52 ` jistone at redhat dot com
  2009-09-09 17:37 ` fche at redhat dot com
  8 siblings, 0 replies; 10+ messages in thread
From: jistone at redhat dot com @ 2009-09-04 18:52 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jistone at redhat dot com  2009-09-04 18:52 -------
(In reply to comment #7)
> I don't know why a 288-byte frame is considered an error.  Too big for a kernel
> function?  I don't see anything in _stp_ctl_write_cmd() that would yield a big
> stack frame.

It is the only caller to the static _stp_do_relocation, which has a local struct
_stp_msg_relocation that's 136 bytes.  Perhaps this and other functions are
being inlined...

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10602

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug translator/10602] REG_IP() used as lvalue fails on s390x, probably ia64
  2009-09-03 22:49 [Bug translator/10602] New: REG_IP() used as lvalue fails on s390x, probably ia64 jkenisto at us dot ibm dot com
                   ` (7 preceding siblings ...)
  2009-09-04 18:52 ` jistone at redhat dot com
@ 2009-09-09 17:37 ` fche at redhat dot com
  8 siblings, 0 replies; 10+ messages in thread
From: fche at redhat dot com @ 2009-09-09 17:37 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2009-09-09 17:37 -------
Added commit 259d54c, please test on your favorite platforms.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=10602

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

end of thread, other threads:[~2009-09-09 17:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-03 22:49 [Bug translator/10602] New: REG_IP() used as lvalue fails on s390x, probably ia64 jkenisto at us dot ibm dot com
2009-09-03 22:54 ` [Bug translator/10602] " jistone at redhat dot com
2009-09-03 23:58 ` jkenisto at us dot ibm dot com
2009-09-04  0:00 ` jkenisto at us dot ibm dot com
2009-09-04  0:34 ` jistone at redhat dot com
2009-09-04  4:54 ` andmike at linux dot vnet dot ibm dot com
2009-09-04  8:40 ` mjw at redhat dot com
2009-09-04 18:15 ` jkenisto at us dot ibm dot com
2009-09-04 18:52 ` jistone at redhat dot com
2009-09-09 17:37 ` fche at redhat dot com

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 read-only IMAP folder(s) and NNTP newsgroup(s).