helloadhavan/github_issues huggingface dataset:
Repository: electron/electron
Pull request: fix: potential crash in `chrome.tabs.update()`

Backport of #45276

See that PR for details.


Notes: Fixed a potential crash in `chrome.tabs.update()`.


Changed files:
filename: shell/browser/extensions/api/tabs/tabs_api.cc
patch: @@ -651,7 +651,16 @@ bool TabsUpdateFunction::UpdateURL(const std::string& url_string,
   // will stay in the omnibox - see https://crbug.com/1085779.
   load_params.transition_type = ui::PAGE_TRANSITION_FROM_API;
 
-  web_contents_->GetController().LoadURLWithParams(load_params);
+  base::WeakPtr<content::NavigationHandle> navigation_handle =
+      web_contents_->GetController().LoadURLWithParams(load_params);
+  // Navigation can fail for any number of reasons at the content layer.
+  // Unfortunately, we can't provide a detailed error message here, because
+  // there are too many possible triggers. At least notify the extension that
+  // the update failed.
+  if (!navigation_handle) {
+    *error = "Navigation rejected.";
+    return false;
+  }
 
   DCHECK_EQ(url,
             web_contents_->GetController().GetPendingEntry()->GetVirtualURL());
Repository: ggml-org/llama.cpp
Pull request: ci : fix ios-xcode-build

Switch to `macos-15` runner and make sure the latest stable version of Xcode is selected, as recommended here https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140

Changed files:
filename: .github/workflows/build.yml
patch: @@ -1113,6 +1113,11 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@v4
 
+      - name: Setup Xcode
+        uses: maxim-lobanov/setup-xcode@v1
+        with:
+          xcode-version: latest-stable
+
       - name: Build
         id: cmake_build
         run: |

filename: .github/workflows/release.yml
patch: @@ -600,14 +600,18 @@ jobs:
           name: llama-bin-win-hip-${{ matrix.name }}-x64.zip
 
   ios-xcode-build:
-    runs-on: macos-latest
+    runs-on: macos-15
 
     steps:
       - name: Checkout code
         uses: actions/checkout@v4
         with:
           fetch-depth: 0
 
+      - name: Setup Xcode
+        run: |
+          sudo xcode-select -s /Applications/Xcode_16.4.app
+
       - name: Build
         id: cmake_build
         run: |
Repository: facebook/react
Pull request: Float integrity bugfix

Stacked on #27223

When a script resource adopts certain props from a preload for that resource the integrity prop was incorrectly getting assinged to the referrerPolicy prop instead. This is now fixed.

Changed files:
filename: packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js
patch: @@ -2872,7 +2872,7 @@ function adoptPreloadPropsForScript(
   if (scriptProps.referrerPolicy == null)
     scriptProps.referrerPolicy = preloadProps.referrerPolicy;
   if (scriptProps.integrity == null)
-    scriptProps.referrerPolicy = preloadProps.integrity;
+    scriptProps.integrity = preloadProps.integrity;
 }
 
 type KeyedTagCache = Map<string, Array<Element>>;
Repository: facebook/react
Pull request: Should not export functions that are not imported

These functions are not imported anywhere and should have not been exported to begin with

Changed files:
filename: packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
patch: @@ -5014,7 +5014,7 @@ function getResourceKey(as: string, href: string): string {
   return `[${as}]${href}`;
 }
 
-export function prefetchDNS(href: string, options?: ?PrefetchDNSOptions) {
+function prefetchDNS(href: string, options?: ?PrefetchDNSOptions) {
   if (!enableFloat) {
     return;
   }
@@ -5073,7 +5073,7 @@ export function prefetchDNS(href: string, options?: ?PrefetchDNSOptions) {
   }
 }
 
-export function preconnect(href: string, options?: ?PreconnectOptions) {
+function preconnect(href: string, options?: ?PreconnectOptions) {
   if (!enableFloat) {
     return;
   }
@@ -5136,7 +5136,7 @@ export function preconnect(href: string, options?: ?PreconnectOptions) {
   }
 }
 
-export function preload(href: string, options: PreloadOptions) {
+function preload(href: string, options: PreloadOptions) {
   if (!enableFloat) {
     return;
   }
Repository: huggingface/transformers
Pull request: [qwen2-vl] fix vision attention scaling

# What does this PR do?

As per title, after the refactor scaling was accidentally changed from `1/math.sqrt(head_dim)` to `math.sqrt(head_dim)`


Changed files:
filename: src/transformers/models/qwen2_5_omni/modeling_qwen2_5_omni.py
patch: @@ -925,7 +925,7 @@ def __init__(self, config: Qwen2_5OmniVisionEncoderConfig = None) -> None:
         self.k = nn.Linear(self.dim, self.dim, bias=True)
         self.v = nn.Linear(self.dim, self.dim, bias=True)
         self.proj = nn.Linear(self.dim, self.dim)
-        self.scaling = math.sqrt(self.head_dim)
+        self.scaling = self.head_dim**-0.5
         self.num_key_value_groups = 1  # needed for eager attention
         self.config = config
 

filename: src/transformers/models/qwen2_5_omni/modular_qwen2_5_omni.py
patch: @@ -1903,7 +1903,7 @@ def __init__(self, config: Qwen2_5OmniVisionEncoderConfig = None) -> None:
         self.k = nn.Linear(self.dim, self.dim, bias=True)
         self.v = nn.Linear(self.dim, self.dim, bias=True)
         self.proj = nn.Linear(self.dim, self.dim)
-        self.scaling = math.sqrt(self.head_dim)
+        self.scaling = self.head_dim**-0.5
         self.num_key_value_groups = 1  # needed for eager attention
         self.config = config
 

filename: src/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py
patch: @@ -24,7 +24,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import math
 from dataclasses import dataclass
 from typing import Any, Callable, Optional, Union
 
@@ -205,7 +204,7 @@ def __init__(self, config: Qwen2_5_VLVisionConfig) -> None:
         self.num_key_value_groups = 1  # needed for eager attention
         self.qkv = nn.Linear(self.dim, self.dim * 3, bias=True)
         self.proj = nn.Linear(self.dim, self.dim)
-        self.scaling = math.sqrt(self.head_dim)
+        self.scaling = self.head_dim**-0.5
         self.config = config
 
     def forward(

filename: src/transformers/models/qwen2_vl/modeling_qwen2_vl.py
patch: @@ -19,7 +19,6 @@
 # limitations under the License.
 """PyTorch Qwen2-VL model."""
 
-import math
 from dataclasses import dataclass
 from typing import Any, Callable, Optional, Union
 
@@ -323,7 +322,7 @@ def __init__(self, config: Qwen2VLVisionConfig) -> None:
         self.num_key_value_groups = 1  # needed for eager attention
         self.qkv = nn.Linear(self.dim, self.dim * 3, bias=True)
         self.proj = nn.Linear(self.dim, self.dim)
-        self.scaling = math.sqrt(self.head_dim)
+        self.scaling = self.head_dim**-0.5
         self.config = config
 
     def forward(
Repository: nodejs/node
Pull request: tools: edit create-release-proposal workflow to handle pr body length

GitHub actions does not allow a body greater than 65536. Therefore, if it exceeds this, it only write the RELEASE_DATE

@RafaelGSS could you pls review it? thx

Changed files:
filename: tools/actions/create-release-proposal.sh
patch: @@ -31,8 +31,9 @@ HEAD_SHA="$(git rev-parse HEAD^)"
 
 TITLE="$(git log -1 --format=%s)"
 
-# Use a temporary file for the PR body
-TEMP_BODY="$(awk "/## ${RELEASE_DATE}/,/^<a id=/{ if (!/^<a id=/) print }" "doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md")"
+TEMP_BODY="$(awk -v MAX_BODY_LENGTH="65536" \
+    "/^## ${RELEASE_DATE}/,/^<a id=/{ if (/^<a id=/) {exit;} if ((output_length += length(\$0)) > MAX_BODY_LENGTH) {exit 1;} print }" \
+    "doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md" || echo "…")"
 
 # Create the proposal branch
 gh api \
Repository: denoland/deno
Pull request: fix(ext/node): use primordials in `ext/node/polyfills/path/_util.ts`

Towards https://github.com/denoland/deno/issues/24236


Changed files:
filename: ext/node/polyfills/path/_util.ts
patch: @@ -2,9 +2,6 @@
 // Ported from https://github.com/browserify/path-browserify/
 // Copyright 2018-2025 the Deno authors. MIT license.
 
-// TODO(petamoriken): enable prefer-primordials for node polyfills
-// deno-lint-ignore-file prefer-primordials
-
 import type { FormatInputPathObject } from "ext:deno_node/path/_interface.ts";
 import {
   CHAR_BACKWARD_SLASH,
@@ -16,6 +13,12 @@ import {
   CHAR_UPPERCASE_Z,
 } from "ext:deno_node/path/_constants.ts";
 import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts";
+import { primordials } from "ext:core/mod.js";
+const {
+  StringPrototypeCharCodeAt,
+  StringPrototypeLastIndexOf,
+  StringPrototypeSlice,
+} = primordials;
 
 export function assertPath(path: string) {
   if (typeof path !== "string") {
@@ -51,7 +54,7 @@ export function normalizeString(
   let dots = 0;
   let code: number | undefined;
   for (let i = 0, len = path.length; i <= len; ++i) {
-    if (i < len) code = path.charCodeAt(i);
+    if (i < len) code = StringPrototypeCharCodeAt(path, i);
     else if (isPathSeparator(code!)) break;
     else code = CHAR_FORWARD_SLASH;
 
@@ -62,17 +65,18 @@ export function normalizeString(
         if (
           res.length < 2 ||
           lastSegmentLength !== 2 ||
-          res.charCodeAt(res.length - 1) !== CHAR_DOT ||
-          res.charCodeAt(res.length - 2) !== CHAR_DOT
+          StringPrototypeCharCodeAt(res, res.length - 1) !== CHAR_DOT ||
+          StringPrototypeCharCodeAt(res, res.length - 2) !== CHAR_DOT
         ) {
           if (res.length > 2) {
-            const lastSlashIndex = res.lastIndexOf(separator);
+            const lastSlashIndex = StringPrototypeLastIndexOf(res, separator);
             if (lastSlashIndex === -1) {
               res = "";
               lastSegmentLength = 0;
             } else {
-              res = res.slice(0, lastSlashIndex);
-              lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);
+              res = StringPrototypeSlice(res, 0, lastSlashIndex);
+              lastSegmentLength = res.length - 1 -
+                StringPrototypeLastIndexOf(res, separator);
             }
             lastSlash = i;
             dots = 0;
@@ -91,8 +95,11 @@ export function normalizeString(
           lastSegmentLength = 2;
         }
       } else {
-        if (res.length > 0) res += separator + path.slice(lastSlash + 1, i);
-        else res = path.slice(lastSlash + 1, i);
+        if (res.length > 0) {
+          res += separator + StringPrototypeSlice(path, lastSlash + 1, i);
+        } else {
+          res = StringPrototypeSlice(path, lastSlash + 1, i);
+        }
         lastSegmentLength = i - lastSlash - 1;
       }
       lastSlash = i;
Repository: facebook/react
Pull request: [Fizz][Float] When src or srcSet is a data URI we should not preload the image

Data URI's in images can't effectively be preloaded (the URI contains the data so preloading only duplicates the data in the stream. If we encounter an image with this protocol in the src attribute we should avoid preloading it.


Changed files:
filename: packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
patch: @@ -2392,14 +2392,32 @@ function pushImg(
   props: Object,
   resources: Resources,
 ): null {
+  const {src, srcSet} = props;
   if (
     props.loading !== 'lazy' &&
-    typeof props.src === 'string' &&
-    props.fetchPriority !== 'low'
+    (typeof src === 'string' || typeof srcSet === 'string') &&
+    props.fetchPriority !== 'low' &&
+    // We exclude data URIs in src and srcSet since these should not be preloaded
+    !(
+      typeof src === 'string' &&
+      src[4] === ':' &&
+      (src[0] === 'd' || src[0] === 'D') &&
+      (src[1] === 'a' || src[1] === 'A') &&
+      (src[2] === 't' || src[2] === 'T') &&
+      (src[3] === 'a' || src[3] === 'A')
+    ) &&
+    !(
+      typeof srcSet === 'string' &&
+      srcSet[4] === ':' &&
+      (srcSet[0] === 'd' || srcSet[0] === 'D') &&
+      (srcSet[1] === 'a' || srcSet[1] === 'A') &&
+      (srcSet[2] === 't' || srcSet[2] === 'T') &&
+      (srcSet[3] === 'a' || srcSet[3] === 'A')
+    )
   ) {
     // We have a suspensey image and ought to preload it to optimize the loading of display blocking
     // resources.
-    const {src, srcSet, sizes} = props;
+    const {sizes} = props;
     const key = getImagePreloadKey(src, srcSet, sizes);
     let resource = resources.preloadsMap.get(key);
     if (!resource) {

filename: packages/react-dom/src/__tests__/ReactDOMFloat-test.js
patch: @@ -3969,6 +3969,36 @@ body {
     );
   });
 
+  it('should not preload images that have a data URIs for src or srcSet', async () => {
+    function App() {
+      return (
+        <html>
+          <body>
+            <img src="data:1" />
+            <img src="data:2" srcSet="ss2" />
+            <img srcSet="data:3a, data:3b 2x" />
+            <img src="4" srcSet="data:4a, data4b 2x" />
+          </body>
+        </html>
+      );
+    }
+    await act(() => {
+      renderToPipeableStream(<App />).pipe(writable);
+    });
+
+    expect(getMeaningfulChildren(document)).toEqual(
+      <html>
+        <head />
+        <body>
+          <img src="data:1" />
+          <img src="data:2" srcset="ss2" />
+          <img srcset="data:3a, data:3b 2x" />
+          <img src="4" srcset="data:4a, data4b 2x" />
+        </body>
+      </html>,
+    );
+  });
+
   describe('ReactDOM.prefetchDNS(href)', () => {
     it('creates a dns-prefetch resource when called', async () => {
       function App({url}) {
Repository: vercel/next.js
Pull request: test(turbopack): Use `mimalloc` for codspeed to make it realistic

### What?

Use `mimalloc` for the codspeed benchmark to make it more realistic.


### Why?

I made a mistake while creating https://github.com/vercel/next.js/pull/79980. I'm retrying this to make the benchmark more realistic.

Note: I didn't apply it to HMR benchmarks because it makes them more flaky.

Closes PACK-4904

Changed files:
filename: crates/next-api/benches/hmr.rs
patch: @@ -1,5 +1,3 @@
-extern crate turbo_tasks_malloc;
-
 use std::{
     env,
     fs::{create_dir_all, write},

filename: turbopack/crates/turbopack-cli/Cargo.toml
patch: @@ -74,6 +74,7 @@ webbrowser = { workspace = true }
 criterion = { workspace = true, features = ["async_tokio"] }
 regex = { workspace = true }
 turbopack-bench = { workspace = true }
+turbo-tasks-malloc = { workspace = true, features = ["custom_allocator"] }
 
 [build-dependencies]
 turbo-tasks-build = { workspace = true }

filename: turbopack/crates/turbopack-cli/benches/small_apps.rs
patch: @@ -1,6 +1,7 @@
 #![cfg_attr(not(codspeed), allow(unused))]
 
-extern crate turbo_tasks_malloc;
+#[global_allocator]
+static ALLOC: turbo_tasks_malloc::TurboMalloc = turbo_tasks_malloc::TurboMalloc;
 
 use std::{
     path::{Path, PathBuf},
Repository: electron/electron
Pull request: fix: potential crash in `chrome.tabs.update()`

#### Description of Change

Refs CL:6042891

From the CL:

> tabs.update() can trigger navigations by providing a new URL. These may
be rejected for any number of reasons. We catch some of these (e.g.,
debug URLs), but do not (and likely will never) have all the same checks
in the extensions layer that we do throughout the navigation stack. This
causes issues, since we expect (and DCHECK) that a navigation
successfully starts, which is causing a crash in the case that it fails.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: Fixed a potential crash in `chrome.tabs.update()`.


Changed files:
filename: shell/browser/extensions/api/tabs/tabs_api.cc
patch: @@ -651,7 +651,16 @@ bool TabsUpdateFunction::UpdateURL(const std::string& url_string,
   // will stay in the omnibox - see https://crbug.com/1085779.
   load_params.transition_type = ui::PAGE_TRANSITION_FROM_API;
 
-  web_contents_->GetController().LoadURLWithParams(load_params);
+  base::WeakPtr<content::NavigationHandle> navigation_handle =
+      web_contents_->GetController().LoadURLWithParams(load_params);
+  // Navigation can fail for any number of reasons at the content layer.
+  // Unfortunately, we can't provide a detailed error message here, because
+  // there are too many possible triggers. At least notify the extension that
+  // the update failed.
+  if (!navigation_handle) {
+    *error = "Navigation rejected.";
+    return false;
+  }
 
   DCHECK_EQ(url,
             web_contents_->GetController().GetPendingEntry()->GetVirtualURL());
Repository: facebook/react
Pull request: Forgot to gate pushImg

`pushImg` should have been gated by enableFloat

Added in #27191 

Changed files:
filename: packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
patch: @@ -3245,7 +3245,9 @@ export function pushStartInstance(
       return pushStartPreformattedElement(target, props, type);
     }
     case 'img': {
-      return pushImg(target, props, resources);
+      return enableFloat
+        ? pushImg(target, props, resources)
+        : pushSelfClosing(target, props, type);
     }
     // Omitted close tags
     case 'base':
Repository: vercel/next.js
Pull request: [turbopack] Add execution tests to demonstrate a bug

 ## Add tests for top level `this` behavior in CJS and ESM modules

### What?
Added two test cases to verify the behavior of `this` in CommonJS and ESM modules:
- CJS test verifies that `this` should be equal to `exports`
- ESM test verifies that `this` should be equal to `globalThis` WHICH IS A BUG, it should be `undefined`



Closes PACK-4906

Changed files:
filename: turbopack/crates/turbopack-tests/tests/execution/turbopack/basic/cjs-this/input/index.js
patch: @@ -0,0 +1,8 @@
+const t = this
+
+it('`this` in cjs should be exports', () => {
+  expect(t).toBe(exports)
+})
+
+// Use a dummy assignment to ensure we are parsed as a cjs module
+exports.something = 'something'

filename: turbopack/crates/turbopack-tests/tests/execution/turbopack/basic/esm-this/input/index.js
patch: @@ -0,0 +1,9 @@
+const t = this
+
+it('`this` in esm should be undefined', () => {
+  // TODO: This is WRONG, it should be undefined
+  expect(t).toBe(globalThis)
+})
+
+// Use a dummy export to ensure this is parsed as an esm module
+export const foo = t
Repository: ggml-org/llama.cpp
Pull request: CUDA: fix negative KV_max values in FA

Looking at the code I noticed that, depending on the inputs, there are scenarios where the values in `KV_max` could become negative. For this to happen there would need to be 16 consecutive tokens that are completely masked out, and the physical batch size would need to be >= 1024. I'm not sure this is going to fix https://github.com/ggml-org/llama.cpp/issues/15294 or https://github.com/ggml-org/llama.cpp/issues/15112 but it should be fixed either way since it could be causing problems in the future.

Changed files:
filename: ggml/src/ggml-cuda/fattn-common.cuh
patch: @@ -539,11 +539,15 @@ static __global__ void flash_attn_mask_to_KV_max(
         all_inf = warp_reduce_all(all_inf);
 
         if (!all_inf) {
-            KV_max_sj += FATTN_KQ_STRIDE;
             break;
         }
     }
 
+    // If the break in the loop was not triggered, KV_max_sj is now -FATTN_KQ_STRIDE.
+    // If the break was triggered it's the lower edge of the tile with the first non-masked values.
+    // In either case, walk back the decrementation by FATTN_KQ_STRIDE.
+    KV_max_sj += FATTN_KQ_STRIDE;
+
     if (threadIdx.x != 0) {
         return;
     }
Repository: vercel/next.js
Pull request: build(turbopack): Update `swc_core` to `v29.2.0`

### What?

ChangeLog: https://github.com/swc-project/swc/compare/swc_core%40v29.1.4...swc_core%40v29.2.0

### Why?

To apply


 - https://github.com/swc-project/swc/pull/10702
 - https://github.com/swc-project/swc/pull/10701

Closes PACK-4907

Changed files:
filename: Cargo.lock
patch: @@ -7130,9 +7130,9 @@ dependencies = [
 
 [[package]]
 name = "swc_core"
-version = "29.1.4"
+version = "29.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "652bfb5da2b20fd9d39b767a34df30ae3d66c0bf8b0014c4d56e87fc8024a178"
+checksum = "0df473ca42b70e49aab2e90d4f76574f0e3eb4a42ddc95a33f8c93d64af67b55"
 dependencies = [
  "binding_macros",
  "par-core",
@@ -7571,9 +7571,9 @@ dependencies = [
 
 [[package]]
 name = "swc_ecma_lexer"
-version = "17.0.4"
+version = "17.0.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0a257fda06cb2aa3f6c0d0d13b534e3376d542d1d84b83c7eda95fbc0729844a"
+checksum = "61f2e87edcfeac99e09c8b47b7b4a921fe2fef0a733f330dc4420727e637d774"
 dependencies = [
  "arrayvec 0.7.4",
  "ascii",
@@ -7680,9 +7680,9 @@ dependencies = [
 
 [[package]]
 name = "swc_ecma_parser"
-version = "17.0.3"
+version = "17.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e746147b3638778a3bc3665f933f62de2d2a5a7fb6b578cc2d6ef72c76bf0191"
+checksum = "8317bbac117ce986efd166b32017f3f5c07def31291e91f709b764501e103890"
 dependencies = [
  "arrayvec 0.7.4",
  "bitflags 2.9.0",
@@ -8039,9 +8039,9 @@ dependencies = [
 
 [[package]]
 name = "swc_ecma_utils"
-version = "18.0.0"
+version = "18.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e6aa9ebca452a7594290928de2a90464b92ae1634d1c22e2593a77b32953016"
+checksum = "938751c806f23256256e6839914ab33e4ac6e79a3fa2e717d004469881d2e3df"
 dependencies = [
  "indexmap 2.7.1",
  "num_cpus",

filename: Cargo.toml
patch: @@ -300,7 +300,7 @@ turbopack-trace-utils = { path = "turbopack/crates/turbopack-trace-utils" }
 turbopack-wasm = { path = "turbopack/crates/turbopack-wasm" }
 
 # SWC crates
-swc_core = { version = "29.1.4", features = [
+swc_core = { version = "29.2.0", features = [
   "ecma_loader_lru",
   "ecma_loader_parking_lot",
   "parallel_rayon",