Unprotected SSVN in XPDR

Bug #355710 reported by bhaskar
2
Affects Status Importance Assigned to Milestone
OpenVista/GT.M Integration
Fix Released
High
JSHER

Bug Description

There is an SSVN in XPDR.m that is not protected. The attached replacement is a small change that uses the appropriate GT.M entrypoint if the underlying MUMPS is GT.M (and should continue to work on other MUMPS implementations).

Revision history for this message
bhaskar (bhaskar) wrote :
Revision history for this message
Jon Tai (jontai) wrote :

Joel, please make sure this updated routine ends up in a build.

Changed in openvista-gtm-integration:
assignee: nobody → joel-sher
importance: Undecided → High
milestone: none → phase-1
Revision history for this message
jeff.apple (jeff-apple) wrote :

From Bhaskar, the diff and a little explanation. NOTE the comments at the bottom about wrapping calls.

$ diff /tmp/XPDR.m XPDR.m
2c2
< ;;8.0;KERNEL;**1,2,44,393**;Jul 10, 1995;Build 12
---
> ;;8.0;KERNEL;**1,2,44**;Jul 10, 1995
21c21
< .S XPDJ=XPDI D:$D(^$R(XPDJ)) F S XPDJ=$O(^$R(XPDJ)) Q:XPDJ=""!($P(XPDJ,XPDI)]"") D
---
> .D SILENT^%RSEL("*") S XPDJ=XPDI D:$D(%ZR(XPDJ)) F S XPDJ=$O(%ZR(XPDJ)) Q:XPDJ=""!($P(XPDJ,XPDI)]"") D
34c34
< W !,"I will delete all local entries in the Routine File in which",!,"the Routine no longer exist on this system!",!
---
> W !,"I will delete all entries in the Routine File in which",!,"the Routine no longer exist on this system!",!
41d40
< W !,"Routines listed as National will not be deleted!"
43c42
< F S DA=$O(^DIC(9.8,DA)) Q:'DA S Y=$G(^(DA,0)) I "R"=$P(Y,U,2),$G(^DIC(9.8,DA,6))<2,$T(^@$P(Y,U))="" D ^DIK
---
> F S DA=$O(^DIC(9.8,DA)) Q:'DA S Y=$G(^(DA,0)) I $P(Y,U,2)="R",$T(^@$P(Y,U))="" D ^DIK

Notice the replacement of the use of the SSVN ^$R() with a call to SILENT^%RSEL(). I erred in my report that the XPDR I submitted would work on other MUMPS systems - in actuality, usage of ^$R() and SILENT^%RSEL would have to be wrapped.

Revision history for this message
bhaskar (bhaskar) wrote : Re: [Bug 355710] Re: Unprotected SSVN in XPDR

Note: I think only the line that replaces the usage of ^$R() with
usage of SILENT^%RSEL() is relevant. The other changes are probably
incidental and reflect different patch levels between the routine I
originally changed and newer versions of XPDR.m.

-- Bhaskar

On Tue, Apr 7, 2009 at 2:55 PM, jeff.apple <email address hidden> wrote:
> >From Bhaskar, the diff and a little explanation. NOTE the comments at
> the bottom about wrapping calls.
>
> $ diff /tmp/XPDR.m XPDR.m
> 2c2
> <     ;;8.0;KERNEL;**1,2,44,393**;Jul 10, 1995;Build 12
> ---
>>     ;;8.0;KERNEL;**1,2,44**;Jul 10, 1995
> 21c21
> <     .S XPDJ=XPDI D:$D(^$R(XPDJ))  F  S XPDJ=$O(^$R(XPDJ)) Q:XPDJ=""!($P(XPDJ,XPDI)]"")  D
> ---
>>     .D SILENT^%RSEL("*") S XPDJ=XPDI D:$D(%ZR(XPDJ))  F  S XPDJ=$O(%ZR(XPDJ)) Q:XPDJ=""!($P(XPDJ,XPDI)]"")  D
> 34c34
> <     W !,"I will delete all local entries in the Routine File in which",!,"the Routine no longer exist on this system!",!
> ---
>>     W !,"I will delete all entries in the Routine File in which",!,"the Routine no longer exist on this system!",!
> 41d40
> <     W !,"Routines listed as National will not be deleted!"
> 43c42
> <     F  S DA=$O(^DIC(9.8,DA)) Q:'DA  S Y=$G(^(DA,0)) I "R"=$P(Y,U,2),$G(^DIC(9.8,DA,6))<2,$T(^@$P(Y,U))="" D ^DIK
> ---
>>     F  S DA=$O(^DIC(9.8,DA)) Q:'DA  S Y=$G(^(DA,0)) I $P(Y,U,2)="R",$T(^@$P(Y,U))="" D ^DIK
>
> Notice the replacement of the use of the SSVN ^$R() with a call to
> SILENT^%RSEL().  I erred in my report that the XPDR I submitted would
> work on other MUMPS systems - in actuality, usage of ^$R() and
> SILENT^%RSEL would have to be wrapped.
>
> --
> Unprotected SSVN in XPDR
> https://bugs.launchpad.net/bugs/355710
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
jeff.apple (jeff-apple) wrote :

As Bhaskar noted, SILENT^%RSEL still needs to be wrapped. In other words, it's specific to GT.M. I'm not sure how to handle this one. X ^%ZOSF("RSEL") seems to be interactive and not what we want.

Revision history for this message
JSHER (joel-sher) wrote :

This routine is not designated as GTM specific and will need to incoporate the old logic for non GTM M environments. I'll make a change to handle GTM and others.

Revision history for this message
JSHER (joel-sher) wrote :

XPDR will be changed to work in GTM and Cache

Changed in openvista-gtm-integration:
status: New → In Progress
Jon Tai (jontai)
Changed in openvista-gtm-integration:
status: In Progress → Fix Committed
Jon Tai (jontai)
Changed in openvista-gtm-integration:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.