Jump to content 日本-日本語
日本HPホーム 製品とサービス サポートとドライバ ソリューション ご購入方法
≫ お問い合わせ
日本HPホーム
企業ユーザ向けサポート情報   >  HP-UX サポート  >  セキュリティ報告&パッチダイジェスト翻訳版

PHCO_36053 s700_800 11.23 awk(1)累積パッチ

企業ユーザ向けサポート情報

HP-UX サポート
Tru64 サポート
OpenVMS サポート
セキュリティ報告&パッチダイジェスト翻訳版
技術情報ツリー
ソフトウェアアップデート情報
ITRC日本フォーラム

ITRC

パッチデータベース
技術情報ベースの検索
サポートケースマネージャ
ソフトウェア アップデート マネージャ (SUM)
ご利用の手順
日本HPサイトマップ
コンテンツに進む
パッチ名:   PHCO_36053

パッチ摘要: s700_800 11.23 awk(1)累積パッチ

作成日:  07/02/28

公開日:  07/04/17

ハードウェアプラットフォームおよびOSリリース:

	s700: 11.23
	s800: 11.23

現象:

	PHCO_36053:

	1.(SR:8606437463 CR:JAGaf95646)
	コメントの長さが200文字を超えていると、awk(1)スクリプトがコアダンプを
	取ります。

	2.(SR:8606454763 CR:JAGag11389)
	UNIX95モードの場合、awk(1)が非整数値を正しく表示しません。

問題点の説明:

	PHCO_36053:

	1.(SR:8606437463 CR:JAGaf95646)
	コメントの長さが200文字を超えていると、awk(1)スクリプトが、コアダンプ
	を取るか、エラーメッセージを表示して終了していました。

	awkスクリプトの1例:

	function hugo()
	{
	printf("Hello\n");
	}

	BEGIN {
	hugo();
	}
	#12345678901234567890123456789012345678901234567890123456789
	012345678901234567890123456789012345678901234567890123456789
	012345678901234567890123456789012345678901234567890123456789
	012345678901234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890

	# awk -f file1
	awk: Cannot make an assignment to . It is a function.
	The source line number is 7.

	または

	# awk -f file1
	Memory fault(coredump)

	単に長いコメントを書くだけで、この問題を再現できます。

	解決方法:
	これらのコメントを無視するようにawk(1)を修正しました。
	これで、上記のawk(1)スクリプトは次のように正しい出力を表示します。

	$ awk -f file1
	Hello

	2.(SR:8606454763 CR:JAGag11389)
	UNIX95仕様によると、整数値と等しい数値の場合、awk(1)は内部変換フォーマ
	ットとして%dを使用しなければなりません。その他の数値の場合は、fmt引き
	数として変数CONVFMTの値を使って文字列に変換する必要があります。ところ
	が、次のような問題が起きていました。

	$ print 2147483648 | UNIX95=1 awk '{ print $1-0 }'
	出力: 2147483647 (これは不正な出力です)

	変換する数値が整数でない(INT_MAXより大きい)場合でも、書式指定子として
	%dを使用していました。

	解決方法:
	UNIX95標準に準拠するようにawk(1)を修正しました。
	これで、上記の例の場合、次のように正しい出力が表示されます。

	$ print 2147483648 | UNIX95=1 awk '{ print $1-0 }'
	2.14748e+09

-----------------------------------------------------------------------------
Patch Name: PHCO_36053

Patch Description: s700_800 11.23 awk(1) cumulative patch

Creation Date: 07/02/28

Post Date: 07/04/17

Hardware Platforms - OS Releases: 
	s700: 11.23
	s800: 11.23

Products: N/A

Filesets: 
	OS-Core.CORE-ENG-A-MAN,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,v=HP
	OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP
	OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_PA,v=HP

Automatic Reboot?: No

Status: General Release

Critical: 
	Yes
	PHCO_36053: ABORT

Category Tags: 
	defect_repair general_release critical halts_system

Path Name: /hp-ux_patches/s700_800/11.X/PHCO_36053

Symptoms: 
	PHCO_36053:
	( SR:8606437463 CR:JAGaf95646 )
	awk(1) script core dumps if the comment length is > 200
	characters.

	( SR:8606454763 CR:JAGag11389 )
	The behaviour of awk(1) under UNIX95 mode when printing
	non-integers is wrong.

	PHCO_33931:
	( SR:8606413259 CR:JAGaf73120 )
	awk(1) doesn't recognize invalid assignment arguments on
	the command line as file names.

	PHCO_31541:
	( SR:8606350356 CR:JAGaf11176 )
	awk(1) stores wrong value for ARGV[0] if awk(1) was
	invoked with path (relative or absolute).

Defect Description: 
	PHCO_36053:
	( SR:8606437463 CR:JAGaf95646 )
	awk(1) script core dumps if the comment length is > 200
	characters. Sometimes it core dumps and sometimes it exits
	with an error message.

	Example:
	Suppose an awk script is as follows:
	function hugo()
	{
	printf("Hello\n");
	}

	BEGIN {
	hugo();
	}
	#12345678901234567890123456789012345678901234567890123456789
	012345678901234567890123456789012345678901234567890123456789
	012345678901234567890123456789012345678901234567890123456789
	012345678901234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890

	# awk -f file1
	awk: Cannot make an assignment to . It is a function.
	The source line number is 7.

	Or

	# awk -f file1
	Memory fault(coredump)

	The defect can be reproduced just by having a long comment.

	Resolution:
	awk(1) is modified to ignore comments.
	The above awk(1) script gives the following output with the
	fix:

	$ awk -f file1
	Hello

	( SR:8606454763 CR:JAGag11389 )
	According to UNIX95 specification, awk(1) should use %d as
	the internal conversion format for a numeric value that is
	exactly equal to the value of an integer. Any other numeric
	value should be converted to a string with the value of the
	variable CONVFMT as the fmt argument. The defect can be
	seen as:
	$ print 2147483648 | UNIX95=1 awk '{ print $1-0 }'
	O/p : 2147483647 (This is wrong o/p)
	Here %d is used as the format specifier even if the number
	to be converted is non-integer (greater than INT_MAX).

	Resolution:
	awk(1) is modified to comply with the UNIX95 standards.

	The above example gives the following output with fix:

	$ print 2147483648 | UNIX95=1 awk '{ print $1-0 }'
	2.14748e+09

	PHCO_33931:
	( SR:8606413259 CR:JAGaf73120 )
	According to UNIX95 specification, awk(1) should consider
	invalid assignment arguments as filenames. The defect can
	be seen when awk(1) command is run as follows:

		awk '{print $0}' 1x=y =x inputfile

	When the UNIX95 environment variable is set, the arguments
	"1x=y" and "=x" in the above command shouldn't be resolved
	as assignments.

	Resolution:
	awk(1) has been modified to comply with the
	unix95 standards.

	PHCO_31541:
	( SR:8606350356 CR:JAGaf11176 )
	If awk(1) is invoked with path (relative or absolute),
	awk(1) stores truncated value in ARGV[0]. The path
	(relative or absolute) is removed and only 'awk' is
	stored in ARGV[0]. The defect can be reproduced by
	the following steps:
	$/usr/bin/awk 'BEGIN { print ARGV[0] ; exit }'
	awk
	This should have printed '/usr/bin/awk'.

	Resolution:
	The UNIX95 behavior of awk(1) is modified so that
	ARGV[0] contains the pathname along-with 'awk'.

Enhancement: 
	No

SR: 
	8606437463 8606454763 8606413259 8606350356

Patch Files: 

	OS-Core.CORE-ENG-A-MAN,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,
		v=HP:
	/usr/share/man/man1.Z/awk.1

	OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP:
	/sbin/awk
	/usr/bin/awk

	OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_PA,v=HP:
	/sbin/awk
	/usr/bin/awk

what(1) Output: 

	OS-Core.CORE-ENG-A-MAN,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,
		v=HP:
	/usr/share/man/man1.Z/awk.1:
		None

	OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP:
	/sbin/awk:
		lib.c $Date: 2007/02/23 16:15:06 $Revision: r11.23/2
			 PATCH_11.23 (PHCO_36053)
		$Revision: @(#) awk R11.23_BL2007_0228_2 PATCH_11.23
			 PHCO_36053
	/usr/bin/awk:
		lib.c $Date: 2007/02/23 16:15:06 $Revision: r11.23/2
			 PATCH_11.23 (PHCO_36053)
		$Revision: @(#) awk R11.23_BL2007_0228_2 PATCH_11.23
			 PHCO_36053

	OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_PA,v=HP:
	/sbin/awk:
		$Revision: 92453-07 linker linker crt0.o B.11.16.01
			030415 $
		lib.c $Date: 2007/02/23 16:15:06 $Revision: r11.23/2
			 PATCH_11.23 (PHCO_36053)
		$Revision: @(#) awk R11.23_BL2007_0228_2 PATCH_11.23
			 PHCO_36053
		$ Internal_Unsupported_Version  Feb 21 2007 22:53:54
			 $
	/usr/bin/awk:
		$Revision: 92453-07 linker linker crt0.o B.11.16.01
			030415 $
		lib.c $Date: 2007/02/23 16:15:06 $Revision: r11.23/2
			 PATCH_11.23 (PHCO_36053)
		$Revision: @(#) awk R11.23_BL2007_0228_2 PATCH_11.23
			 PHCO_36053

cksum(1) Output: 

	OS-Core.CORE-ENG-A-MAN,fr=B.11.23,fa=HP-UX_B.11.23_IA/PA,
		v=HP:
	888279328 8920 /usr/share/man/man1.Z/awk.1

	OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_IA,v=HP:
	3284979218 1129516 /sbin/awk
	3062373713 271696 /usr/bin/awk

	OS-Core.UX2-CORE,fr=B.11.23,fa=HP-UX_B.11.23_PA,v=HP:
	3953961002 606208 /sbin/awk
	1442844070 184320 /usr/bin/awk

Patch Conflicts: None

Patch Dependencies: None

Hardware Dependencies: None

Other Dependencies: None

Supersedes: 
	PHCO_31541 PHCO_33931

Equivalent Patches: None

Patch Package Size: 850 KBytes

Installation Instructions: 
	Please review all instructions and the Hewlett-Packard
	SupportLine User Guide or your Hewlett-Packard support terms
	and conditions for precautions, scope of license,
	restrictions, and, limitation of liability and warranties,
	before installing this patch.
	------------------------------------------------------------
	1. Back up your system before installing a patch.

	2. Login as root.

	3. Copy the patch to the /tmp directory.

	4. Move to the /tmp directory and unshar the patch:

		cd /tmp
		sh PHCO_36053

	5. Run swinstall to install the patch:

		swinstall -x autoreboot=true -x patch_match_target=true \
			  -s /tmp/PHCO_36053.depot

	By default swinstall will archive the original software in
	/var/adm/sw/save/PHCO_36053.  If you do not wish to retain a
	copy of the original software, include the patch_save_files
	option in the swinstall command above:

		-x patch_save_files=false

	WARNING: If patch_save_files is false when a patch is installed,
		 the patch cannot be deinstalled.  Please be careful
		 when using this feature.

	For future reference, the contents of the PHCO_36053.text file is
	available in the product readme:

		swlist -l product -a readme -d @ /tmp/PHCO_36053.depot

	To put this patch on a magnetic tape and install from the
	tape drive, use the command:

		dd if=/tmp/PHCO_36053.depot of=/dev/rmt/0m bs=2k

Special Installation Instructions: None

ページトップへ
セキュリティ報告&パッチダイジェスト翻訳版に戻る
プライバシー 本サイト利用時の合意事項 ウェブマスターに連絡
© 2008 Hewlett-Packard Development Company, L.P.