Skip to content

Commit

Permalink
8273135: java/awt/color/ICC_ColorSpace/MTTransformReplacedProfile.jav…
Browse files Browse the repository at this point in the history
…a crashes in liblcms.dylib with NULLSeek+0x7

Reviewed-by: aivanov, azvegint
  • Loading branch information
mrserb committed Sep 15, 2021
1 parent 6cf70f5 commit 1017a2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/java.desktop/share/native/liblcms/cmsio0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1532,7 +1532,7 @@ cmsBool IsTypeSupported(cmsTagDescriptor* TagDescriptor, cmsTagTypeSignature Typ
void* CMSEXPORT cmsReadTag(cmsHPROFILE hProfile, cmsTagSignature sig)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
cmsIOHANDLER* io = Icc ->IOhandler;
cmsIOHANDLER* io;
cmsTagTypeHandler* TypeHandler;
cmsTagTypeHandler LocalTypeHandler;
cmsTagDescriptor* TagDescriptor;
Expand Down Expand Up @@ -1573,6 +1573,7 @@ void* CMSEXPORT cmsReadTag(cmsHPROFILE hProfile, cmsTagSignature sig)

if (TagSize < 8) goto Error;

io = Icc ->IOhandler;
// Seek to its location
if (!io -> Seek(io, Offset))
goto Error;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

/**
* @test
* @bug 8271718
* @bug 8271718 8273135
* @summary Verifies MT safety of color transformation while profile is changed
*/
public final class MTTransformReplacedProfile {
Expand Down

16 comments on commit 1017a2c

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrserb
Copy link
Member Author

@mrserb mrserb commented on 1017a2c Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u

@openjdk
Copy link

@openjdk openjdk bot commented on 1017a2c Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrserb could not automatically backport 1017a2c2 to Optional[openjdk/jdk17u] due to conflicts in the following files:

  • test/jdk/java/awt/color/ICC_ColorSpace/MTTransformReplacedProfile.java

To manually resolve these conflicts run the following commands in your personal fork of Optional[openjdk/jdk17u]:

$ git checkout -b mrserb-backport-1017a2c2
$ git fetch --no-tags https://git.openjdk.java.net/jdk 1017a2c2d7ae99e0076abcfaf5e730fec3cb9c6c
$ git cherry-pick --no-commit 1017a2c2d7ae99e0076abcfaf5e730fec3cb9c6c
$ # Resolve conflicts
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport 1017a2c2d7ae99e0076abcfaf5e730fec3cb9c6c'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the Optional[openjdk/jdk17u] with the title Backport 1017a2c2d7ae99e0076abcfaf5e730fec3cb9c6c.

@mrserb
Copy link
Member Author

@mrserb mrserb commented on 1017a2c Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u pull/91

@openjdk
Copy link

@openjdk openjdk bot commented on 1017a2c Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrserb the target branch pull/91 does not exist

@mrserb
Copy link
Member Author

@mrserb mrserb commented on 1017a2c Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u pull/91/head:pull/91

@openjdk
Copy link

@openjdk openjdk bot commented on 1017a2c Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrserb the target branch pull/91/head:pull/91 does not exist

@mrserb
Copy link
Member Author

@mrserb mrserb commented on 1017a2c Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u/pull/91

@openjdk
Copy link

@openjdk openjdk bot commented on 1017a2c Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrserb the target repository jdk17u/pull/91 is not a valid target for backports.
List of valid target repositories: openjdk/jdk11u, openjdk/jdk11u-dev, openjdk/jdk12u, openjdk/jdk13u, openjdk/jdk13u-dev, openjdk/jdk14u, openjdk/jdk15u, openjdk/jdk15u-dev, openjdk/jdk16u, openjdk/jdk17u.
Supplying the organization/group prefix is optional.

@mrserb
Copy link
Member Author

@mrserb mrserb commented on 1017a2c Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @erikj79, do you know how to create a backport on top of other PR?
Something like was mentioned here https://bugs.openjdk.java.net/browse/SKARA-511

@mrserb
Copy link
Member Author

@mrserb mrserb commented on 1017a2c Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u 91

@openjdk
Copy link

@openjdk openjdk bot commented on 1017a2c Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrserb the target branch 91 does not exist

@mrserb
Copy link
Member Author

@mrserb mrserb commented on 1017a2c Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u

@openjdk
Copy link

@openjdk openjdk bot commented on 1017a2c Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrserb the backport was successfully created on the branch mrserb-backport-1017a2c2 in my personal fork of openjdk/jdk17u. To create a pull request with this backport targeting openjdk/jdk17u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

this pull request contains a backport of commit 1017a2c2 from the openjdk/jdk repository.

The commit being backported was authored by Sergey Bylokhov on 15 Sep 2021 and was reviewed by Alexey Ivanov and Alexander Zvegintsev.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u:

$ git fetch https://github.com/openjdk-bots/jdk17u mrserb-backport-1017a2c2:mrserb-backport-1017a2c2
$ git checkout mrserb-backport-1017a2c2
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u mrserb-backport-1017a2c2

@mrserb
Copy link
Member Author

@mrserb mrserb commented on 1017a2c Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk11u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 1017a2c Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrserb Could not automatically backport 1017a2c2 to openjdk/jdk11u-dev due to conflicts in the following files:

  • src/java.desktop/share/native/liblcms/cmsio0.c
  • test/jdk/java/awt/color/ICC_ColorSpace/MTTransformReplacedProfile.java

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk11u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk11u-dev.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b backport-mrserb-1017a2c2-master

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git 1017a2c2d7ae99e0076abcfaf5e730fec3cb9c6c

# Backport the commit
$ git cherry-pick --no-commit 1017a2c2d7ae99e0076abcfaf5e730fec3cb9c6c
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport 1017a2c2d7ae99e0076abcfaf5e730fec3cb9c6c'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk11u-dev with the title Backport 1017a2c2d7ae99e0076abcfaf5e730fec3cb9c6c.

Below you can find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 1017a2c2 from the openjdk/jdk repository.

The commit being backported was authored by Sergey Bylokhov on 15 Sep 2021 and was reviewed by Alexey Ivanov and Alexander Zvegintsev.

Thanks!

Please sign in to comment.